Today while setting up a mail server using postfix, I practiced to use sender_canonical_maps option, and noticed that it can change outgoing mail "sender" to appear like someone else. When Gmail picked up the mail, it showed the fake sender as the origin.

If mail sender can be easily faked, as an Email end-user, how do I distinguish between fake sender and real sender?


For starters, changing the sending mail address is not necessarily "faking". You may simply change the address from one address that is yours to another that is also yours.

But, to answer your question - neither SMTP nor the message format gives you that possibility. Pretty much every piece of spam mail that you get has both an envelope sender and a From:-header that has nothing to do with who actually sent the mail.

Some email providers, e.g. gmail, will do their best to verify that you are not using a From:-header that does not belong to you. But even when they do that, if someone else can get at your gmail account, they will also be able to send mail using those headers, even though they are not you. It's also possible to verify that the domain name in the envelope sender address matches the server from which the mail was sent, by using e.g. DKIM. But it's far from universally adopted.

The way to certify a sender is to use e.g. GPG to sign the message cryptographically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.