This is a list of Simple Mail Transfer Protocol response status codes. Status codes are issued by a server in response to a client's request made to the server. It includes codes from IETF Request for Comments and other specifications of SMTP. The first digit of the status code specifies one of five standard classes of responses: 1xx ; 2xx ; 3xx ; 4xx or 5xx. The message phrases shown are typical, but any human-readable alternative may be provided.
Overview
Unless otherwise stated, the status code is part of the current SMTP standard. All SMTP response status codes are separated into five classes. The first digit of the status code defines the class of response:
1xx : Connection related error
2xx : The requested action has been successfully completed
3xx : Further action needs to be taken in order to complete the requested action
4xx : The requested action failed, but may be retried later
5xx : The requested action failed, and should not be retried
The last two digits do not have any class or categorization role. These return codes have been in SMTP from the beginning, with RFC 821 in 1982, but were extended rather extensively, and haphazardly so that by 2003 rather grumpily noted that: "SMTP suffers some scars from history, most notably the unfortunate damage to the reply code extension mechanism by uncontrolled use." defines a separate series of enhanced mail system status codes which is intended to be better structured. The Internet Assigned Numbers Authority maintains the official registry of these enhanced status codes.
1xx Connection
101The server is unable to connect 111Connection refused or inability to open an SMTP stream
2xx Success
This class of status codes indicates the action requested by the client was received, understood and accepted. 200System status message or help reply 214A response to the HELP command 220The server is ready 221The server is closing its transmission channel 250Requested mail action okay completed 251User not local will forward 252Cannot verify the user, but it will try to deliver the message anyway
3xx Additional data required
354Start mail input
4xx Persistent transient failure
In most cases when receiving a 4xx error the sending mail server will attempt to retry delivery after a delay, and may repeatedly do so for up to a day or two depending on configuration before reporting to their user that the mail could not be delivered. 420Timeout connection problem 421Service is unavailable because the server is shutting down. 422The recipient’s mailbox has exceeded its storage limit 431Not enough space on the disk 432Recipient’s incoming mail queue has been stopped 441The recipient’s server is not responding 442The connection was dropped during the transmission 446The maximum hop count was exceeded for the message 447Message timed out because of issues concerning the incoming server 449Routing error 450User’s mailbox is unavailable 451Aborted – Local error in processing 452insufficient storage on the server 471An error of your mail server
5xx Permanent errors
These errors will result in the SMTP connection being dropped, and the sending mail server will advise the user that their mail could not be delivered.
500Syntax error 501Syntax error in parameters or arguments 503Bad sequence of commands, or requires authentication 504Command parameter is not implemented 510Bad email address 511Bad email address 512Host server for the recipient’s domain name cannot be found in DNS 513Address type is incorrect 523Encryption is required before the requested authentication mechanism may be used. 530 Authentication problem 541The recipient address rejected your message 550Non-existent email address, or command rejected for policy reasons 551User not local, relaying denied, providing correct address 552Exceeded storage allocation 553Mailbox name invalid 554Transaction has failed
Example
Below is an example SMTP connection, where a client "C" is sending to server "S": S: 220 smtp.example.com ESMTP Postfix C: HELO relay.example.com S: 250 smtp.example.com, I am glad to meet you C: MAIL FROM: S: 250 Ok C: RCPT TO: S: 250 Ok C: RCPT TO: S: 250 Ok C: DATA S: 354 End data with . C: From: "Bob Example" C: To: Alice Example C: Cc: theboss@example.com C: Date: Tue, 15 Jan 2008 16:02:43 -0500 C: Subject: Test message C: C: Hello Alice. C: This is a test message with 5 header fields and 4 lines in the message body. C: Your friend, C: Bob C:. S: 250 Ok: queued as 12345 C: QUIT S: 221 Bye