RFC 1846
SMTP 521 Reply Code
RFC 1846: SMTP 521 Reply Code ๐โจ
okay bestie, the title block is the first thing to know ๐ซถ RFC 1846 is called SMTP 521 Reply Code ๐ . It was written by A. Durand from IMAG and F. Dupont from INRIA Rocquencourt ๐ฉโ๐ป. The category is Experimental ๐งช, the date is September 1995 ๐ , and nothing is listed as obsoleted or updated ๐.
Status of this Memo ๐งพ
This memo defines an Experimental Protocol for the Internet community ๐งช. It does not specify an Internet standard of any kind ๐ โโ๏ธ. Discussion and suggestions for improvement are requested, and distribution of this memo is unlimited ๐ฃ.
Abstract ๐
This memo adds a brand new Simple Mail Transfer Protocol (SMTP) [1] reply code, 521 ๐. Its whole job is to tell the sender that an Internet host does not accept incoming mail ๐ซ๐ฌ.
1. Motivations ๐
Hosts on the Internet used to be big general-purpose machines, but now they're smaller and more specialized ๐ง. Lots of them have one specific job, like serving NTP or DNS ๐ฐ๏ธ. Those dedicated hosts frequently don't provide mail service at all ๐.
Usually these mailless hosts don't run an SMTP server ๐ซฅ. But users will occasionally misaddress mail to them, and that's where the drama starts ๐ฎ๐. Regular SMTP clients trying to deliver that misaddressed mail must treat the missing SMTP server as a temporary error ๐ฌ. They must queue the mail for later delivery, just in case an SMTP server gets started later โณ.
So the mail just sits in the queue for days ๐ญ. Then it finally gets returned with an error message that's usually super confusing ๐. Not slay.
2. Two complementary solutions ๐ค
Two complementary solutions MAY be implemented to handle this ๐ซถ. Solution one is to use MX relays to bounce misaddressed mail ๐. Solution two is to run a minimal SMTP server on the mailless host so it bounces all mail ๐๏ธ. Which one you pick is site dependent ๐ .
3. The MX relays solution ๐
MX relays can be used to tell SMTP clients that an Internet host does not accept mail ๐ โโ๏ธ. During the SMTP dialog, these MX relays MAY bounce any message destined for this particular host with an SMTP 521 reply code ๐ .
Here's what that looks like ๐:
---> 220 relay.imag.fr ready
<--- HELO client.inria.fr
---> 250 relay.imag.fr Hello client.inria.fr
<--- MAIL FROM: <user1@client.inria.fr>
---> 250 <user1@client.inria.fr>... Sender Ok
<--- RCPT TO: <user2@nomail.imag.fr>
---> 521 nomail.imag.fr does not accept mail
<--- QUIT
---> 221 relay.imag.fr closing connection
If an MX relay of precedence n for a mailless host bounces mail on its behalf, then any other MX relay with a precedence lower than n for that mailless host SHOULD do the same ๐ซก.
4. The SMTP server solution ๐ฅ๏ธ
4.1 521 greeting ๐
A host can say it doesn't accept mail by sending an initial 521 "Host does not accept mail" reply to an incoming SMTP connection ๐. The official name of the server host or its IP address MUST be sent as the first word after the reply code ๐ท๏ธ.
For example: 521 canon.inria.fr does not accept mail
4.2 SMTP dialog ๐ฌ
After sending the initial 521 reply, the server host MUST do one of these two things:
- a) Close the SMTP connection.
- b) Read commands, and issue 521 replies to all commands except QUIT. If the SMTP client doesn't issue the QUIT command after a reasonable time, the SMTP server MUST time out and close the connection. A suggested time-out value is 5 minutes โฐ.
DISCUSSION ๐ฃ๏ธ: When an SMTP server closes the connection right after the initial 521 reply, some existing SMTP clients treat that as a transient error and requeue the mail for later delivery ๐ค. If the SMTP server keeps the connection open instead, those clients immediately send QUIT and return the mail ๐ค.
4.3 MX ๐
A host which sends a 521 greeting message MUST NOT be listed as an MX record for any domain ๐ซ.
4.4 Postmaster ๐ฎ
An SMTP server which sends a 521 greeting message IS NOT subject to the postmaster requirement of STD 3, RFC 1123 ([2]) ๐.
DISCUSSION ๐ฃ๏ธ: Postmaster exists so you can report mail errors. A host that doesn't support mail doesn't need a Postmaster ๐โโ๏ธ.
5. SMTP client behavior ๐งโ๐ป
If an SMTP client runs into a host in an MX record that issues a 521 greeting message, it must do one of these two things:
- a) Attempt to deliver the mail to a different MX host for that domain.
- b) Return the mail with an appropriate non-delivery report.
If an SMTP client encounters a 521 reply code in any other part of the SMTP dialog, it MUST return the mail with an appropriate non-delivery report ๐จ.
6. Security Considerations ๐
Not running any SMTP server, or running an SMTP server that simply emits fixed strings in response to incoming connections, should provide significantly fewer opportunities for security problems than running a complete SMTP implementation ๐๐.
7. Authors' Addresses ๐ฌ
Alain Durand
Institut de Mathematiques Appliquees de Grenoble (IMAG)
BP 53 38041 Grenoble CEDEX 9 France
Phone : +33 76 63 57 03
Fax : +33 76 44 66 75
EMail: Alain.Durand@imag.fr
Francis Dupont
Institut National de Recherche en Informatique et en Automatique
B.P. 105 / 78153 Le Chesnay CEDEX France
Phone : +33 1 39 63 52 13
Fax : +33 1 39 63 53 30
EMail: Francis.Dupont@inria.fr
8. Expericences ๐ฃ
People implementing this reply code are suggested to send a message to mailext@list.cren.net to report their experience ๐งช๐.
9. References ๐
[1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821, USC/Information Sciences Institute, August 1982.
[2] Braden, R., Editor, "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, USC/Information Sciences Institute, October 1989.
๐ฆ where this page comes from
- ietf: rfc1846 1995-09
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms