Network Working Group A. Durand Request For Comments: 1846 IMAG Category: Experimental F. Dupont INRIA Rocquencourt September 1995
SMTP 521 Reply Code
Status of this Memo
This memo defines an Experimental Protocol for the Internet community. This memo does not specify an Internet standard of any kind. Discussion and suggestions for improvement are requested. Distribution of this memo is unlimited.
This memo defines a new Simple Mail Transfer Protocol (SMTP)  reply code, 521, which one may use to indicate that an Internet host does not accept incoming mail.
Hosts on the Internet have shifted from large, general-purpose hosts to smaller, more specialized hosts. There is an increasing number of hosts which are dedicated to specific tasks, such as serving NTP or DNS. These dedicated hosts frequently do not provide mail service.
Usually, these mailless hosts do not run an SMTP server. Unfortunately, users will occasionally misaddress mail to these hosts. Regular SMTP clients attempting to deliver this misaddressed mail must treat the lack of an SMTP server on the host as a temporary error. They must queue the mail for later delivery, should an SMTP server be started at a later time.
This causes the mail to remain queued for days, until it is returned with what is usually a confusing error message.
Two complementary solutions MAY be implemented to deal with this issue. The first one is to use MX relays to bounce misaddressed mails. The second one is to implement a minimal smtp server on the mailless host to bounce all mails.
The choice between the two solutions is site dependent.
A host may indicate that it does not 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 following the reply code.
For example: 521 canon.inria.fr does not accept mail
After issuing the initial 521 reply, the server host MUST do one of the following two options:
a) Close the SMTP connection. b) Read commands, issuing 521 replies to all commands except QUIT. If the SMTP client does not 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.
Durand & Dupont Experimental [Page 2]
RFC 1846 SMTP 521 Reply Code September 1995
When an SMTP server closes the connection immediatly after issuing the initial 521 reply, some existing SMTP clients treat the condition as a transient error and requeue the mail for later delivery. If the SMTP server leaves the connection open, those clients immediately send the QUIT command and return the mail.
Not running any SMTP server, or running an SMTP server which simply emits fixed strings in response to incoming connection should provide significantly fewer opportunities for security problems than running a complete SMTP implementation.