SMTP Status Codes
- Abstracted from RFC 2821
The three digits of the reply each have a special significance. The first digit denotes whether the response is good, bad or incomplete. An unsophisticated SMTP client, or one that receives an unexpected code, will be able to determine its next action (proceed as planned, redo, retrench, etc.) by examining this first digit. An SMTP client that wants to know approximately what kind of error occurred (e.g., mail system error, command syntax error) may examine the second digit. The third digit and any supplemental information that may be present is reserved for the finest gradation of information.
There are five values for the first digit of the reply code. The second digit encodes responses in specific categories. The third digit gives a finer gradation of meaning in each category specified by the second digit. The list of replies illustrates this. Each reply text is recommended rather than mandatory, and may even change according to the command with which it is associated. On the other hand, the reply codes must strictly follow the specifications in this section. Receiver implementations should not invent new codes for slightly different situations from the ones described here, but rather adapt codes already defined.
Positive Preliminary reply - 1xx
The command has been accepted, but the requested action is being held in abeyance, pending confirmation of the information in this reply. The SMTP client should send another command specifying whether to continue or abort the action. Note: unextended SMTP does not have any commands that allow this type of reply, and so does not have continue or abort commands.
Positive Completion reply - 2xx
The requested action has been successfully completed. A new request may be initiated.
- 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 - <domain> Service ready
- 221 - <domain> Service closing transmission channel
- 250 - Requested mail action okay, completed
- 251 - User not local; will forward to <forward-path>
- 252 - Cannot VRFY user, but will accept message and attempt delivery
- 253 - OK, <messages> pending messages for node <node> started
Positive Intermediate reply - 3xx
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. This reply is used in command sequence groups (i.e., in DATA).
- 354 - Start mail input; end with <CRLF>.<CRLF>
- 355 - Octet-offset is the transaction offset
Transient Negative Completion reply - 4xx
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). It is difficult to assign a meaning to “transient” when two different sites (receiver- and sender-SMTP agents) must agree on the interpretation. Each reply in this category might have a different time value, but the SMTP client is encouraged to try again. A rule of thumb to determine whether a reply fits into the 4yz or the 5yz category (see below) is that replies are 4yz if they can be successful if repeated without any change in command form or in properties of the sender or receiver (that is, the command is repeated identically and the receiver does not put up a new implementation).
- 421 - <domain> Service not available, closing transmission channel
- This may be a reply to any command if the service knows it must shut down
- 432 - A password transition is needed
- 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
- 453 - You have no mail
- 454 - TLS not available due to temporary reason. Encryption required for requested authentication mechanism
- 458 - Unable to queue messages for node <node>
- 459 - Node <node> not allowed: <reason>
Permanent Negative Completion reply - 5xx
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). Even some “permanent” error conditions can be corrected, so the human user may want to direct the SMTP client to re-initiate the command sequence by direct action at some point in the future (e.g., after the spelling has been changed, or the user has altered the account status).
- 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
- 521 - <machine> does not accept mail
- 530 - Must issue a STARTTLS command first. Encryption required for requested authentication mechanism
- 534 - Authentication mechanism is too weak
- 538 - Encryption required for requested authentication mechanism
- 550 - Requested action not taken: mailbox unavailable
- e.g., mailbox not found, no access, or command rejected for policy reasons
- 551 - User not local; please try <forward-path>
- 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
- Or, in the case of a connection-opening response, “No SMTP service here”
