What are the SMTP Reply Codes?


This article applies to:

  • Trustwave MailMarshal (SEG)

Question:

What are SMTP Reply codes and their definitions?

Information:

Below is a list of commonly used SMTP Reply Codes that may be useful when troubleshooting sending problems. Note, these reply codes are not specific to MailMarshal - they are generic codes from the RFC standards and will generally apply to all compliant mail systems.

  • Codes are generated by the receiving server. For troubleshooting suggestions see the Notes at the end of this article

SMTP Reply Codes are used to ensure the synchronization of requests and actions in the process of mail transfer and to guarantee that the SMTP client always know the state of the SMTP server.

A SMTP reply code consists of a three digit number, followed by some text. The number is used by the automata to determine what state to enter next, and the text is for the human user. The context of the text may vary for each reply code.

The three digits of the reply code each have a special significance. The first digit denotes whether the response is good, bad, or incomplete. There are five values for the first digit of the reply code:

  • 1 - Positive Preliminary reply: The command has been accepted, but the requested action is being held in abeyance, pending confirmation of the information in this reply.

  • 2 - Positive Completion reply: The requested action has been successfully completed. A new request may be initiated.

  • 3 - Positive Intermediate reply: The command has been accepted, but the requested action is being held in abeyance, pending receipt of further information. The SMTP client should send another command specifying this information.

  • 4 - Transient Negative Completion reply: The command was not accepted, and the requested action did not occur. However, the error condition is temporary and the action may be requested again. The sender should return to the beginning of the command sequence (if any).

  • 5 - Permanent Negative Completion reply: The command was not accepted and the requested action did not occur. The SMTP client is discouraged from repeating the exact request (in the same sequence).



SMTP Code Meaning
211 System status, or system help reply
214 Help message [Information on how to use the receiver or the meaning of a particular non-standard command; this reply is useful only to the human user]
220 Service ready
221 Service closing transmission channel
250 Requested mail action okay, completed
251 User not local; will forward to forwardpath
354 Start mail input; end with .
421 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 [E.g., mailbox busy]
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognized [This may include errors such as command line too long]
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command parameter not implemented
550 Requested action not taken: mailbox unavailable [E.g., mailbox not found, no access]
551 User not local; please try forwardpath
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed [E.g., mailbox syntax incorrect]
554 Transaction failed

Notes:

SMTP response codes are generated and returned by the remote server receiving email. A NDR reply that reports the response comes from the sending server (such as MailMarshal or other local mail server).

  • The server that sends the NDR did not reject the message.

For troubleshooting using SMTP codes, it is important to check which server actually first generated the response. You can check this in MailMarshal message logs.

  • If an error was generated by a remote destination server, to resolve the error you would need to contact the owner of that server.

 

This article was previously published as:
NETIQKB29295
Marshal KB240

Last Modified 3/1/2020.
https://support.trustwave.com/kb/KnowledgebaseArticle10837.aspx