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. The Internet Assigned Numbers Authority (IANA) maintains the official registry of SMTP status codes.[1]

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
  • 3xx (Additional data required): Further action needs to be taken in order to complete the requested action
  • 4xx (Transient Error): The requested action failed, but may be retried later
  • 5xx (Permanent Error): 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 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."

1xx Informational

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.[2]

200 System status message or help reply

214 A response to the HELP command

220 The server is ready

221 The server is closing its transmission channel

250 Requested mail action okay completed

251 User not local will forward

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

3xx Redirection

354 Start 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.

420 Timeout connection problem

421 Service is unavailable due to a connection problem

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

451 Aborted – Local error in processing

452 Too many emails sent or too many recipients

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

501 Syntax error in parameters or arguments

503 Bad sequence of commands, or requires authentication

504 Command parameter is not implemented

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 associated with encryption in RFC 5248

530 Authentication problem

541 The recipient address rejected your message

550 Non-existent email address

551 User not local or invalid address – relay denied

552 Exceeded storage allocation

553 Mailbox name invalid

554 Transaction 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:<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}

See also

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.