Commit | Line | Data |
---|---|---|
2117e02e MW |
1 | .TH envelopes 5 |
2 | .SH "NAME" | |
3 | envelopes \- sender/recipient lists attached to messages | |
4 | .SH "INTRODUCTION" | |
5 | Electronic mail messages are delivered in | |
6 | .IR envelopes . | |
7 | ||
8 | An envelope lists a | |
9 | .I sender | |
10 | and one or more | |
11 | .IR recipients . | |
12 | Usually these | |
13 | envelope addresses are the same | |
14 | as the addresses listed in the message header: | |
15 | ||
16 | .EX | |
17 | (envelope) from djb to root | |
18 | .br | |
19 | From: djb | |
20 | .br | |
21 | To: root | |
22 | .EE | |
23 | ||
24 | In more complicated situations, though, | |
25 | the envelope addresses may differ from the header addresses. | |
26 | .SH "ENVELOPE EXAMPLES" | |
27 | When a message is delivered to | |
28 | several people at different locations, | |
29 | it is first photocopied | |
30 | and placed into several envelopes: | |
31 | ||
32 | .EX | |
33 | (envelope) from djb to root | |
34 | .br | |
35 | From: djb Copy #1 of message | |
36 | .br | |
37 | To: root, god@brl.mil | |
38 | .EE | |
39 | ||
40 | .EX | |
41 | (envelope) from djb to god@brl.mil | |
42 | .br | |
43 | From: djb Copy #2 of message | |
44 | .br | |
45 | To: root, god@brl.mil | |
46 | .EE | |
47 | ||
48 | When a message is delivered | |
49 | to several people at the same location, | |
50 | the sender doesn't have to photocopy it. | |
51 | He can instead stuff it into | |
52 | one envelope with several addresses; | |
53 | the recipients will make the photocopy: | |
54 | ||
55 | .EX | |
56 | (envelope) from djb to god@brl.mil, angel@brl.mil | |
57 | .br | |
58 | From: djb | |
59 | .br | |
60 | To: god@brl.mil, angel@brl.mil, joe, frde | |
61 | .EE | |
62 | ||
63 | Bounced mail is sent back to the envelope sender address. | |
64 | The bounced mail doesn't list an envelope sender, | |
65 | so bounce loops are impossible: | |
66 | ||
67 | .EX | |
68 | (envelope) from <> to djb | |
69 | .br | |
70 | From: MAILER-DAEMON | |
71 | .br | |
72 | To: djb | |
73 | .br | |
74 | Subject: unknown user frde | |
75 | .EE | |
76 | ||
77 | The recipient of a message may make another copy | |
78 | and forward it in a new envelope: | |
79 | ||
80 | .EX | |
81 | (envelope) from djb to joe | |
82 | .br | |
83 | From: djb Original message | |
84 | .br | |
85 | To: joe | |
86 | .EE | |
87 | ||
88 | .EX | |
89 | (envelope) from joe to fred | |
90 | .br | |
91 | From: djb Forwarded message | |
92 | .br | |
93 | To: joe | |
94 | .EE | |
95 | ||
96 | A mailing list works almost the same way: | |
97 | ||
98 | .EX | |
99 | (envelope) from djb to sos-list | |
100 | .br | |
101 | From: djb Original message | |
102 | .br | |
103 | To: sos-list | |
104 | .EE | |
105 | ||
106 | .EX | |
107 | (envelope) from sos-owner to god@brl.mil | |
108 | .br | |
109 | From: djb Forwarded message | |
110 | .br | |
111 | To: sos-list to recipient #1 | |
112 | .EE | |
113 | ||
114 | .EX | |
115 | (envelope) from sos-owner to frde | |
116 | .br | |
117 | From: djb Forwarded message | |
118 | .br | |
119 | To: sos-list to recipient #2 | |
120 | .EE | |
121 | ||
122 | Notice that the mailing list is set up | |
123 | to replace the envelope sender with something new, | |
124 | .BR sos-owner . | |
125 | So bounces will come back to | |
126 | .BR sos-owner : | |
127 | ||
128 | .EX | |
129 | (envelope) from <> to sos-owner | |
130 | .br | |
131 | From: MAILER-DAEMON | |
132 | .br | |
133 | To: sos-owner | |
134 | .br | |
135 | Subject: unknown user frde | |
136 | .EE | |
137 | ||
138 | It's a good idea to set up an extra address, | |
139 | .BR sos-owner , | |
140 | like this: | |
141 | the original envelope sender (\fBdjb\fP) | |
142 | has no way to fix bad | |
143 | .B sos-list | |
144 | addresses, | |
145 | and of course bounces must not be sent to | |
146 | .B sos-list | |
147 | itself. | |
148 | .SH "HOW ENVELOPE ADDRESSES ARE STORED" | |
149 | Envelope sender and envelope recipient addresses | |
150 | are transmitted and recorded in several ways. | |
151 | ||
152 | When a user injects mail through | |
153 | .BR qmail-inject , | |
154 | he can supply a | |
155 | .B Return-Path | |
156 | line or a | |
157 | .B \-f | |
158 | option for the envelope sender; | |
159 | by default the envelope sender is his login name. | |
160 | The envelope recipient addresses can be taken | |
161 | from the command line or from various header fields, | |
162 | depending on the options to | |
163 | .BR qmail-inject . | |
164 | Similar comments apply to | |
165 | .BR sendmail . | |
166 | ||
167 | When a message is transferred from one machine to another through SMTP, | |
168 | the envelope sender is given in a | |
169 | .B MAIL FROM | |
170 | command, | |
171 | the envelope recipients are given in | |
172 | .B RCPT TO | |
173 | commands, | |
174 | and the message is supplied separately by a | |
175 | .B DATA | |
176 | command. | |
177 | ||
178 | When a message is delivered by | |
179 | .B qmail | |
180 | to a single local recipient, | |
181 | .B qmail-local | |
182 | records the recipient in | |
183 | .B Delivered-To | |
184 | and the envelope sender in | |
185 | .BR Return-Path . | |
186 | It uses | |
187 | .B Delivered-To | |
188 | to detect mail forwarding loops. | |
189 | ||
190 | .B sendmail | |
191 | normally records the envelope sender in | |
192 | .BR Return-Path . | |
193 | It does not record envelope recipient addresses, | |
194 | on the theory that they are redundant: | |
195 | you received the mail, | |
196 | so you must have been one of the envelope recipients. | |
197 | ||
198 | Note that, | |
199 | if the header doesn't have any recipient addresses, | |
200 | .B sendmail | |
201 | will move envelope recipient addresses back into the header. | |
202 | This situation occurs if all addresses were originally listed as | |
203 | .BR Bcc , | |
204 | since | |
205 | .B Bcc | |
206 | is automatically removed. | |
207 | When | |
208 | .B sendmail | |
209 | sees this, it creates a new | |
210 | .B Apparently-To | |
211 | header field with the envelope recipient addresses. | |
212 | This has the strange effect that each blind-carbon-copy recipient will see | |
213 | a list of all recipients on the same machine. | |
214 | ||
215 | When a message is stored in | |
216 | .B mbox | |
217 | format, | |
218 | the envelope sender is recorded at the top of the message | |
219 | as a UUCP-style | |
220 | .B From | |
221 | (no colon) line. | |
222 | Note that this line is less reliable than the | |
223 | .B Return-Path | |
224 | line added by | |
225 | .B qmail-local | |
226 | or | |
227 | .B sendmail\fP. | |
228 | .SH "SEE ALSO" | |
229 | qmail-header(5), | |
230 | qmail-local(8), | |
231 | qmail-inject(8) |