Network Working Group A. Durand
Request For Comments: 1846 IMAG
Category: Experimental F. Dupont
INRIA Rocquencourt
September 1995
SMTP 521 Reply Code
1. Motivations
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.
2. Two complementary solutions
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.
Durand & Dupont Experimental [Page 1]
RFC 1846 SMTP 521 Reply Code September 1995 3. The MX relays solutionMX relays may be used to indicate SMTP clients that an Internet host does not accept mail.
---> 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 connectionIf an MX relay of precedence n for a mailless host bounces mails on its behalf, then any other MX relay of precedence lower than n for this mailless host SHOULD do the same.
4. The SMTP server solution 4.1 521 greetingA 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.
4.2 SMTP dialog
After issuing the initial 521 reply, the server host MUST do one of the following two options:
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.
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]).
5. SMTP client behavior
If an SMTP client encounters a host in an MX record that issues a 521 greeting message, it must do one of the following two options:
6. Security Considerations
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.
Durand & Dupont Experimental [Page 3]
RFC 1846 SMTP 521 Reply Code September 1995 7. Authors' AddressesAlain Durand Institut de Mathematiques Appliquees de Grenoble (IMAG) BP 53 38041 Grenoble CEDEX 9 France
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,