List of SMTP server return codes

This is a list of Simple Mail Transfer Protocol (SMTP) 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 (RFCs) and other specifications of SMTP. The first digit of the status code specifies one of five standard classes of responses: 1xx (Connection); 2xx (Success); 3xx (Additional data required); 4xx (Temporary Error) or 5xx (Permanent Error).

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 RFC 5321.

All SMTP response status codes are separated into five classes (or categories). The first digit of the status code defines the class of response:

  • 1xx (Connection): Connection related error
  • 2xx (Success): The requested action has been successfully completed [1]
  • 3xx (Additional data required): Further action needs to be taken in order to complete the requested action [1]
  • 4xx (Transient Error): The requested action failed, but may be retried later [1]
  • 5xx (Permanent Error): The requested action failed, and should not be retried [1]

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 RFC 3463 rather grumpily noted that: "SMTP suffers some scars from history, most notably the unfortunate damage to the reply code extension mechanism by uncontrolled use." RFC 3463 defines a separate series of enhanced mail system status codes which is intended to be better structured. The Internet Assigned Numbers Authority (IANA) maintains the official registry of these enhanced status codes.[2]

1xx Connection

101 The server is unable to connect

111 Connection 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.

200 System status message or help reply

214 A response to the HELP command [1]

220 The server is ready [1]

221 The server is closing its transmission channel [1]

250 Requested mail action okay completed [1]

251 User not local will forward [1]

252 Cannot verify the user, but it will try to deliver the message anyway [1]

3xx Additional data required

354 Start mail input [1]

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.

420 Timeout connection problem

421 Service is unavailable because the server is shutting down. [1]

422 The recipient’s mailbox has exceeded its storage limit

431 Not enough space on the disk

432 Recipient’s incoming mail queue has been stopped

441 The recipient’s server is not responding

442 The connection was dropped during the transmission

446 The maximum hop count was exceeded for the message

447 Message timed out because of issues concerning the incoming server

449 Routing error

450 User’s mailbox is unavailable [1]

451 Aborted – Local error in processing [1]

452 insufficient storage on the server [1]

471 An 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.

500 Syntax error [1]

501 Syntax error in parameters or arguments [1]

503 Bad sequence of commands[1], or requires authentication

504 Command parameter is not implemented [1]

510 Bad email address

511 Bad email address

512 Host server for the recipient’s domain name cannot be found in DNS

513 Address type is incorrect

523 Encryption is required before the requested authentication mechanism may be used. [3]

530 Authentication problem

541 The recipient address rejected your message

550 Non-existent email address, or command rejected for policy reasons [1]

551 User not local, relaying denied, providing correct address [1]

552 Exceeded storage allocation [1]

553 Mailbox name invalid [1]

554 Transaction has failed [1]

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:<bob@example.com>
S: 250 Ok
C: RCPT TO:<alice@example.com>
S: 250 Ok
C: RCPT TO:<theboss@example.com>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <bob@example.com>
C: To: Alice Example <alice@example.com>
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
{The server closes the connection}

Notes

    References

    This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.