RFC defined SMTP Status Error Codes
rfc 821 for the basic specification of SMTP
 

SMTP protocol specific response code design provides some useful (numeric) codes used for reporting mail (delivery status) system errors (Protocol–a method of sending and receiving data).

SMTP is a simple ASCII protocol. SMTP is a protocol governing electronic mail transmission and reception (sending and receiving emails between mail servers).

Operational Sequent of:
SMTP
Simple Mail Transfer Protocol

How two MTAs (Message Transfer Agent) communicate with each other using a single TCP connection.

  1. Email is delivered by the source host (sender) establishing a TCP connection to port 25 of the (recipient) destination host and wait...
     
  2. An email daemon speaking SMTP simple ASCII (rfc 821) listening at port 25 on the (recipient) destination hose identify itself and tell the (sender) whether it will accept mail....
     
  3. *If not Server-time-out--the sending mail server terminate the connection and try again later, after a predefined undeliverable attempts--any undeliverable message will be returned (rfc 821) with an error report containing the first part (message headers) to the sender.
     
  4. If the (recipient) mail server is willing to accept the mail, the (sender) mail server send the email address of the recipient...
     
  5. If it is a valid recipient email address, the (recipient) mail server gives a go-ahead signal...
     
  6. Message is sent and acknowledged.

*If not--There are no standard mechanism for reporting mail system errors except for the limited codes consisting of three numbers offered by SMTP with specific text descriptions sent in mail messages.

Because of its limitations, the majority of each code delivery report may indicate several other error conditions as well as different mail server using their own text description.

The first number generally tells whether the server accepted the command and if it could manage it.

2 The server has completed the task successfully.

3 The server has understood the request,
   but requires further information to complete it.

4 The server has encountered a temporary failure.
    If the command is repeated without any change,
    it might be completed.

5 The server has encountered an error.

The second number gives more information.
Its six possible values are:

0 A syntax error has occurred.
1 Indicates a informational reply, for example to a HELP request.
2 Refers to the connection status.
3 Unspecified.
4 Unspecified.
5 Refers to the status of the mail system
   as a whole and the mail server in particular.

The third number shows more graduations of the mail transfer status to return a more detailed report as detailed in the ESMTP server response codes defined in RFC 821 and later extensions.

Example of an older SMTP response text description for the first number.
2.x.x    Success
            
(The server has completed the task successfully).

4.x.x   Persistent Transient Failure
           
(The server has encountered a temporary failure).

5.x.x   Permanent Failure (The server has encountered an error).

The number 5
.x.x at the beginning of the specified SMTP protocol response code is about the only thing you can go by, because different mail server can use their own text description with the second and third number.

 

Example of a new ESMTP response
Extended SMTP (ESMTP) consists of several extensions to the basic SMTP protocol. All of the extensions are optional. SMTP server may support any extension that it chooses, or none at all.
See: Definition of ESMTP

501 5.5.4  Syntax error

501 Syntax error represent the enhanced SMTP (ESMTP) status code

5.5.4 represent the old SMTP status code

 

 

 


 

New enhanced ESMTP Status/Error Codes
and descriptions defined by RFC Protocol
=========================================
ESMTP connect and data receive reply codes command groups

rfc 821 for the basic specification of SMTP

 

200  Nonstandard success response
see
http://www.faqs.org/rfcs/rfc876.html

211 System status or system help reply 

214 Help message
A help message for human reader follows. (Information on how to use the receiver or the meaning of a particular non-standard command)
 

220 <domain> Service ready
Confirming the connection to your ISP mail server.
 

221 <domain> Service closing transmission channel
To stop sending email after a QUIT signal is send to your ISP mail server.
 

250 Requested mail action taken, completed
Your ISP mail server have successfully executes a command and the DNS is reporting a positive delivery.
 

251 User not local, will forward to <forward-path>
Your message to a specified email address is not local to the mail server, but it will accept and forward the message to a different recipient email address.
 

252 Recipient cannot be verified
but mail server accepts the message and attempts delivery.
 

354 Start mail input and end with <CRLF> <CRLF>
Indicates mail server is ready to accept the message or instruct your mail client to send the message body after the mail server have received the message headers.
 

421 <domain> Service not available, closing transmission channel This may be a reply to any command if the service knows it must shut down.
 

450 Requested mail action not taken: mailbox unavailable
Your ISP mail server indicates that an email address does not exist or the mailbox is busy. It could be the network connection went down while sending, or it could also happen if the remote mail server does not want to accept mail from your for some reason i.e. (IP address, From address, Recipient, etc.)
 

451 Requested action aborted: local error in processing
Your ISP mail server indicates that the mailing has been interrupted, usually due to overloading from too many messages or transient failure is one in which the message sent is valid, but some temporary event prevents the successful sending of the message. Sending in the future may be successful.
 

452 Requested action not taken: insufficient system storage
Your ISP mail server indicates, probable overloading from too many messages and sending in the future may be successful.
 

452 too many messages' error
Some mail servers have the option to reduce the number of concurrent connection and also the number of messages sent per connection. If you have a lot of messages queued up it could go over the max number of messages per connection. To see if this is the case you can try submitting only a few messages to that domain at a time and then keep increasing the number until you find the maximum number accepted by the server.

 

 

 


 

500 Syntax error, command unrecognized
This may include errors such as command line too long.
 

501 Syntax error in parameters or arguments
Indicates possible poor (noisy dialup) or an intermittent drop in network line connection that caused your mail client to send erroneous command to the mail server.
 

502 Command not implemented
Indicates that your ISP mail server did not recognized a command sent.
 

503 Server encountered bad sequence of commands
Indicates (probable) that your ISP mail server did not recognized a command sent that is erroneous. Some temporary event prevents the successful sending of the message or an intermittent drop in network line connection that caused your mail client to send erroneous command and sending in the future may be successful.
 

504 Command parameter not implemented
Indicates (probable) that your ISP mail server did not recognized a command sent.
 

521 <domain does not accept mail or closing transmission channel You must be pop-authenticated before you can use this SMTP server and you must use your mail address for the Sender/From field.
 

530 Access denied (???a Sendmailism)
 

550 Requested action not taken, mailbox unavailable
Indicates that your recipient's email address was not recognized by your ISP mail server or (mailbox not found or cannot access it).
 

550 Relaying prohibited or Not local host… not a gateway
or Unable to relay for…    or user’s mailbox unavailable

Sending an email to recipients outside of your domain are not allowed or your mail server does not know that you have access to use it for relaying messages and authentication is required. Or to prevent the sending of SPAM some mail servers will not allow (relay) send mail to any e-mail using another company’s network and computer resources.
 

550 This address is not allowed or Requested action not taken: mailbox unavailable
Seems like the setting of the “From Address” are incorrect and/or an attempted was made to deliver but there was a non fatal error and it will be retried and/or some change to the message destination must be made for successful delivery.
 

551 User not local, please try <forward-path> or Invalid Address: Relay request denied
Indicates that the recipient's email address have changed and your ISP mail server is forwarding it back to you and/or your ISP SMTP mail server does not accept email when neither the sender nor the recipient is a local user--this feature was implemented to protect the mail server from being used by spammers to relay their messages by using another company’s network and computer resources.
 

552 Requested mail action aborted: exceeded storage allocation ISP mail server indicates, probable overloading from too many messages.
 

553 Denied. Requested action not taken: mailbox name not allowed or bad command format
(E.g., mailbox syntax incorrect)  Some mail servers have the option to reduce the number of concurrent connection and also the number of messages sent per connection. If you have a lot of messages queued up (being sent) for a domain, it could go over the maximum number of messages per connection and/or some change to the message and/or destination must be made for successful delivery.
 

554 Transaction failed or Permanent Failure
A permanent failure is one which is not likely to be resolved by resending the message in its current form and some change to the message and/or destination must be made for successful delivery.
 

557 Too many duplicate messages: Resource temporarily unavailable Indicates (probable) that there is some kind of anti-spam system on the mail server.
 

572 Relay not authorized or Not local host… not a gateway
Not allowed to send email to recipients outside of your domain. To prevent SPAM many mail server will not allow you to send mail to any ISP SMTP mail server when either the sender or recipient is a local user. This feature is implemented to protect the mail server from being used by spammers to relay their messages using another company’s network and computer resources. Some mail servers required you to log in before sending messages.
 

 

 


 

Request For Comment (RFC)
A document outlining a standard and proposed standard to an existing standard. The protocols and standards that currently govern RFC are constantly changing and not limited to the following examples.

rfc 821 for the basic specification of SMTP

rfc1123 for important additional information.
http://sunsite.org.uk/rfc/rfc1123.txt

For information about enhanced status codes.
rfc1893
  
http://sunsite.org.uk/rfc/rfc1893.txt
rfc2034   http://sunsite.org.uk/rfc/rfc2034.txt

RFC index for further mail-related RFCs
http://sunsite.org.uk/rfc/rfc-index.txt

rfc2821 for the basic specification of SMTP
http://sunsite.org.uk/rfc/rfc2821.txt

RFC 821 Simple Mail Transfer Protocol (SMTP)
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc0821.txt

RFC 822 Standard for the format of ARPA Internet text messages
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc0822.txt

RFC 1123 Internet Host Requirements
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc1123.txt

RFC 1854 SMTP Service Extension for Command Pipelining
RFC 1869
 SMTP Service Extensions (ESMTP)
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc1869.txt

RFC 1891 SMTP Service Extension for Delivery Status Notifications
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc1891.txt

RFC 1892 Multipart/Report
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc0821.txt

RFC 1893 Mail System Status Codes (about enhanced status codes)
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc1893.txt

RFC 1894 Delivery Status Notifications
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc1894.txt

RFC 1939 Post Office Protocol – Version 3
Post Office Protocol (POP3 RFC 1939) Version 3 is a standard internet protocol used for retrieving Internet email. It is used by your email client (Eudora, Netscape Communicator, MS Outlook, etc.) to communicate with a SMTP mail server.

RFC 2045 MIME Part One: Format of Internet Message Bodies

RFC 1985 SMTP Service Extension for Remote Message Queue Starting  www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc1985.txt

RFC 2034 SMTP Service Extension for Returning Enhanced Error Codes www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc2034.txt

RFC 2045 MIME
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc2045.txt

RFC 2046 MIME Part Two: Media Types
RFC 1047 MIME Part Three: Message Header Extensions for
               Non-ASCII Text

RFC 2060 IMAP Version 4 rev 1

RFC 2476 Message Submission
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc2476.txt

RFC 2505 Anti Spam Recommendations
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc2505.txt

RFC 2554 SMTP Service Extension for Authentication
www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc2554.txt

RFC 2635 Guidelines for Mass Unsolicited Mailings and Postings (Spam) www.urz.uni-heidelberg.de/Netzdienste/Mail/rfc/rfc2635.txt

 

References

RFC: Request For Comments, the 'laws' of the Internet. http://www.faqs.org/rfcs/

RFC791 -- http://www.faqs.org/rfcs/rfc791.html

RFC1122 -- http://www.faqs.org/rfcs/rfc1122.html

RFC1918 -- http://www.faqs.org/rfcs/rfc1918.html

Technical tutorial
http://oac3.hsc.uth.tmc.edu/staff/snewton/tcp-tutorial/