envelopes(5) envelopes(5) NNAAMMEE envelopes - sender/recipient lists attached to messages IINNTTRROODDUUCCTTIIOONN Electronic mail messages are delivered in _e_n_v_e_l_o_p_e_s. An envelope lists a _s_e_n_d_e_r and one or more _r_e_c_i_p_i_e_n_t_s. Usually these envelope addresses are the same as the addresses listed in the message header: (envelope) from djb to root From: djb To: root In more complicated situations, though, the envelope addresses may dif- fer from the header addresses. EENNVVEELLOOPPEE EEXXAAMMPPLLEESS When a message is delivered to several people at different locations, it is first photocopied and placed into several envelopes: (envelope) from djb to root From: djb Copy #1 of message To: root, god@brl.mil (envelope) from djb to god@brl.mil From: djb Copy #2 of message To: root, god@brl.mil When a message is delivered to several people at the same location, the sender doesn’t have to photocopy it. He can instead stuff it into one envelope with several addresses; the recipients will make the photo- copy: (envelope) from djb to god@brl.mil, angel@brl.mil From: djb To: god@brl.mil, angel@brl.mil, joe, frde Bounced mail is sent back to the envelope sender address. The bounced mail doesn’t list an envelope sender, so bounce loops are impossible: (envelope) from <> to djb From: MAILER-DAEMON To: djb Subject: unknown user frde The recipient of a message may make another copy and forward it in a new envelope: (envelope) from djb to joe From: djb Original message To: joe (envelope) from joe to fred From: djb Forwarded message To: joe A mailing list works almost the same way: (envelope) from djb to sos-list From: djb Original message To: sos-list (envelope) from sos-owner to god@brl.mil From: djb Forwarded message To: sos-list to recipient #1 (envelope) from sos-owner to frde From: djb Forwarded message To: sos-list to recipient #2 Notice that the mailing list is set up to replace the envelope sender with something new, ssooss--oowwnneerr. So bounces will come back to ssooss--oowwnneerr: (envelope) from <> to sos-owner From: MAILER-DAEMON To: sos-owner Subject: unknown user frde It’s a good idea to set up an extra address, ssooss--oowwnneerr, like this: the original envelope sender (ddjjbb) has no way to fix bad ssooss--lliisstt addresses, and of course bounces must not be sent to ssooss--lliisstt itself. HHOOWW EENNVVEELLOOPPEE AADDDDRREESSSSEESS AARREE SSTTOORREEDD Envelope sender and envelope recipient addresses are transmitted and recorded in several ways. When a user injects mail through qqmmaaiill--iinnjjeecctt, he can supply a RReettuurrnn-- PPaatthh line or a --ff option for the envelope sender; by default the enve- lope sender is his login name. The envelope recipient addresses can be taken from the command line or from various header fields, depending on the options to qqmmaaiill--iinnjjeecctt. Similar comments apply to sseennddmmaaiill. When a message is transferred from one machine to another through SMTP, the envelope sender is given in a MMAAIILL FFRROOMM command, the envelope recipients are given in RRCCPPTT TTOO commands, and the message is supplied separately by a DDAATTAA command. When a message is delivered by qqmmaaiill to a single local recipient, qqmmaaiill--llooccaall records the recipient in DDeelliivveerreedd--TToo and the envelope sender in RReettuurrnn--PPaatthh. It uses DDeelliivveerreedd--TToo to detect mail forwarding loops. sseennddmmaaiill normally records the envelope sender in RReettuurrnn--PPaatthh. It does not record envelope recipient addresses, on the theory that they are redundant: you received the mail, so you must have been one of the envelope recipients. Note that, if the header doesn’t have any recipient addresses, sseennddmmaaiill will move envelope recipient addresses back into the header. This sit- uation occurs if all addresses were originally listed as BBcccc, since BBcccc is automatically removed. When sseennddmmaaiill sees this, it creates a new AAppppaarreennttllyy--TToo header field with the envelope recipient addresses. This has the strange effect that each blind-carbon-copy recipient will see a list of all recipients on the same machine. When a message is stored in mmbbooxx format, the envelope sender is recorded at the top of the message as a UUCP-style FFrroomm (no colon) line. Note that this line is less reliable than the RReettuurrnn--PPaatthh line added by qqmmaaiill--llooccaall or sseennddmmaaiill. SSEEEE AALLSSOO qmail-header(5), qmail-local(8), qmail-inject(8) envelopes(5)