3 addresses \- formats for Internet mail addresses
7 is a string of characters containing @.
9 Every mail address has a
13 The domain part is everything after the final @.
14 The local part is everything before.
16 For example, the mail addresses
32 Some domains have owners.
33 It is up to the owner of
35 to say how mail messages will be delivered to addresses with domain part
38 The domain part of an address is interpreted without regard to case, so
48 all refer to the same domain.
50 There is one exceptional address that does not contain an @:
51 namely, the empty string.
52 The empty string cannot be used as a recipient address.
53 It can be used as a sender address so that
54 the real sender doesn't receive bounces.
55 .SH "QMAIL EXTENSIONS"
58 system allows several further types of addresses in mail envelopes.
60 First, an envelope recipient address without an @ is interpreted as being at
69 .BR God@heaven.af.mil .
73 is used as an envelope sender address for double bounces.
75 Third, envelope sender addresses of the form
76 .I pre\fB@\fIhost\fB-@[]
77 are used to support variable envelope return paths (VERPs).
80 .I pre\fB@\fIhost\fB-@[]
82 .I prerecip\fB=\fIdomain\fB@\fIhost
84 .IR recip\fB@\fIdomain .
89 .SH "CHOOSING MAIL ADDRESSES"
90 Here are some suggestions on choosing mail addresses for the Internet.
92 Do not use non-ASCII characters.
93 Under RFC 822 and RFC 821,
94 these characters cannot be used in mail headers or in SMTP commands.
95 In practice, they are regularly corrupted.
97 Do not use ASCII control characters.
98 NUL is regularly corrupted.
99 CR and LF cannot be used in some combinations
100 and are corrupted in all.
101 None of these characters are usable on business cards.
103 Avoid spaces and the characters
109 These all require quoting in mail headers and in SMTP.
110 Many existing mail programs do not handle quoting properly.
112 Do not use @ in a local part.
113 @ requires quoting in mail headers and in SMTP.
114 Many programs incorrectly look for the first @,
115 rather than the last @,
116 to find the domain part of an address.
119 do not use two consecutive dots, a dot at the beginning, or a dot at the end.
120 Any of these would require quoting in mail headers.
122 Do not use an empty local part; it cannot appear in SMTP commands.
124 Avoid local parts longer than 64 characters.
126 Be wary of uppercase letters in local parts.
127 Some mail programs (and users!) will incorrectly convert
130 .BR god@heaven.af.mil .
132 Be wary of the following characters:
138 Some users will not know
139 how to feed these characters safely to their mail programs.
141 In domain names, stick to letters, digits, dash, and dot.
142 One popular DNS resolver has,
143 under the banner of security,
144 recently begun destroying domain names
145 that contain certain other characters,
146 including underscore.
147 Exception: A dotted-decimal IP address in brackets,
150 identifies a domain owned by whoever owns the host at that IP address,
151 and can be used safely.
154 do not use two consecutive dots,
155 a dot at the beginning,
158 when a domain name is broken down into components separated by dots,
159 there are no empty components.
161 Always use at least one dot in a domain name.
165 don't bother using the address
167 most users will be unable to send messages to that address.
168 Same for the root domain.
170 Avoid domain names longer than 64 characters.
171 .SH "ENCODED ADDRESSES IN SMTP COMMANDS"
172 RFC 821 defines an encoding of mail addresses in SMTP.
173 For example, the addresses
178 a"quote@heaven.af.mil
180 The Almighty.One@heaven.af.mil
183 could be encoded in RCPT commands as
186 RCPT TO:<God@heaven.af.mil>
188 RCPT TO:<a\\"quote@heaven.af.mil>
190 RCPT TO:<The\\ Almighty.One@heaven.af.mil>
193 There are several restrictions in RFC 821
194 on the mail addresses that can be used over SMTP.
195 Non-ASCII characters are prohibited.
196 The local part must not be empty.
197 The domain part must be a sequence of elements separated by dots,
198 where each element is either a component,
199 a sequence of digits preceded by #,
200 or a dotted-decimal IP address surrounded by brackets.
201 The only allowable characters in components are
202 letters, digits, and dashes.
203 Every component must (believe it or not)
204 have at least three characters;
205 the first character must be a letter;
206 the last character must not be a hyphen.
207 .SH "ENCODED ADDRESSES IN MAIL HEADERS"
208 RFC 822 defines an encoding of mail addresses
209 in certain header fields in a mail message.
210 For example, the addresses
215 a"quote@heaven.af.mil
217 The Almighty.One@heaven.af.mil
220 could be encoded in a
225 To: God@heaven.af.mil,
227 <@brl.mil:"a\\"quote"@heaven.af.mil>,
229 "The Almighty".One@heaven.af.mil
235 To: < "God"@heaven .af.mil>,
237 "a\\"quote" (Who?) @ heaven . af. mil
239 , God<"The Almighty.One"@heaven.af.mil>
242 There are several restrictions on the mail addresses that can
243 be used in these header fields.
244 Non-ASCII characters are prohibited.
245 The domain part must be a sequence of elements separated by dots,
246 where each element either (1) begins with [ and ends with ]
247 or (2) is a nonempty string of printable ASCII characters
254 and not including space.