Email is crazy

68 points by FlyingSnake


fanf

The envelope is like an address written on the physical letter, whereas the header is like the sender’s signature on the letter. SMTP doesn’t check if they match.

There are a few reasons for this that deserve a little more unpacking:

Traditionally, message submission was done using a command such as sendmail -t which takes a message and creates an envelope from it. As part of that process the BCC: header’s contents are added to the envelope recipients and the BCC: header is deleted. When email moved from timesharing to client-server and SMTP started being used for message submission, the responsibility for creating the envelope moved to the MUA. (It wasn’t until several years later that client-server message submission and server-server message transfer were clarified as distinct protocols, so it was always either too early or too late to add a sendmail -t feature to SMTP.)

The other thing that happens during message submission is the authenticated sender’s address is put in the Sender: header, if it is different to the From: header. That allows you to make an author/sender distinction (useful for secretaries or when multiple staff are handling a role address) or even list multiple authors in the From: header. (I tried sending a multiple-author message over 20 years ago: almost everything assumes a single author so it did not work very well. I assume multi-author messages are even more broken these days.)

When a message is delivered to a mailing list, traditionally the From: header is left alone (so that recipients can reply to the author as usual) but the sender is replaced with the mailing list’s bounce handler. This allows the mailing list software to deal with list members whose addresses are broken, and people who send messages to the list (and who cannot fix it) are not bothered by the problems. Nowadays it’s more common for mailing lists to replace the From: header as well, because that works better with DKIM and DMARC.