SMTP codes and error messages
This topic gives an introduction to the SMTP protocol and describes status codes and possible reasons for SMTP errors.
SMTP protocol
SMTP stands for Simple Mail Transfer Protocol, which provides mechanisms for the transmission of emails and is the technical standard behind the sending, relaying and receiving of these.
When you start a mailing in Optimizely Campaign, it is transferred to the Optimizely Campaign sending SMTP server, a so-called Mail Transfer Agent (MTA). The MTA relays your e-mails to the receiving server of the target ISP Stands for "internet service provider" or domain owner via the SMTP protocol, which ultimately delivers the individual e-mails to the corresponding mailboxes.
In an ideal world, your email gets accepted by the ISP and delivered to the intended recipient's inbox. Having some experience with email marketing, you already know that this is not always what happens. Your emails may get delayed, land in the spam folder, or may be dropped or returned to you as a bounce Generated whenever an email fails to reach a recipient's server or mailbox..
SMTP status codes
Since there are many potential outcomes of a sending attempt, standard mechanisms for the reporting of mail system errors were developed to make processing and analysis of these easier and more transparent. The result of this is a list of possible SMTP status codes that you will often see included in bounce messages when analyzing your returns.
In most cases, the mailbox providers return two pieces of information in the event of a bounce, a traditional SMTP response status code and an enhanced mail system status code. Both provide information about the reason for the rejection and help in finding a solution.
Traditional SMTP respone status codes
According to the first scheme developed, the traditional SMTP response status codes defined in RFC 5321, the receiving SMTP server of an ISP or domain owner responds to the sender using a three-digit code. All SMTP response status codes are separated into five classes and the first digit of the status code defines the class of response:
- 1xx (Informational). The request was received, continuing process.
- 2xx (Success). The request was successfully received, understood, and accepted.
- 3xx (Redirection). Further action needs to be taken, in order to complete the request.
- 4xx (Persistent transient failure). The request contains bad syntax or cannot be fulfilled.
- 5xx (Permanent errors). The server failed to fulfill an apparently valid request.
A successfully delivered e-mail has the status code 250 Requested mail action okay completed.
The SMTP response status codes to be applied are defined by the host of a server. Different ISPs, mailbox providers or domain owners may define them differently. Therefore, there is no unique presentation.
SMTP status code | Error message |
---|---|
420 | Timeout |
421 | <domain> Service not available |
422 | Unprocessable Entity |
431 | Not enough space on the disk |
432 | Recipient's incoming mail queue has been stopped |
441 | Account is over data quota |
442 | Connection Refused |
446 | The maximum hop count was exceeded for the message |
447 | Timeout |
449 | Routing error |
450 | Requested mail action not taken: mailbox unavailable |
451 | Requested action aborted: local error in processing |
452 | Requested action not taken: insufficient system storage |
471 | An error of your mail server |
500 | Syntax error, command unrecognised |
501 | Syntax error in parameters or arguments |
502 | Command not implemented |
503 | Bad sequence of commands |
504 | Command parameter 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 |
521 | <domain> does not accept mail |
523 | Size of your mail exceeds the server limits |
530 | Access denied |
541 | The recipient address rejected your message |
550 | Requested action not taken: mailbox unavailable |
551 | User not local |
552 | Requested mail action aborted: exceeded storage allocation |
553 | Requested action not taken: mailbox name not allowed |
554 | Transaction failed |
Enhanced mail system status codes
Since the information provided in the traditional codes is limited and there was a need for reporting mechanisms richer than these, a new set of enhanced mail system status codes was proposed in RFC 3463. The enhanced mail system status codes are based on the SMTP theory of reply codes and adopt the success, permanent error, and transient error semantics of the first value, with a further description and classification in the second:
- 2.XXX.XXX (Success). Success specifies that the DSN is reporting a positive delivery action. Detail sub-codes may provide notification of transformations required for delivery.
- 4.XXX.XXX (Persistent Transient Failure). A persistent transient failure is one in which the message as sent is valid, but persistence of some temporary condition has caused abandonment or delay of attempts to send the message. If this code accompanies a delivery failure report, sending in the future may be successful.
- 5.XXX.XXX (Permanent Failure). A permanent failure is one which is not likely to be resolved by resending the message in the current form. Some change to the message or the destination must be made for successful delivery.
A successfully delivered e-mail has the status code 2.0.0 (success).
Just like the traditional SMTP response status codes, the application of these varies from mailbox provider to mailbox provider. For undelivered emails, are may transmitted bounce codes as below. These can appear as a persistent transient failure starting with a 4, or as a permanent failure starting with a 5.
SMTP status code | Error message |
---|---|
X.0.0 | Other undefined status |
X.1.0 | Other address status |
X.1.1 | Bad destination mailbox address |
X.1.2 | Bad destination system address |
X.1.3 | Bad destination mailbox address syntax |
X.1.4 | Destination mailbox address ambiguous |
X.1.5 | Destination address valid |
X.1.6 | Destination mailbox has moved, No forwarding address |
X.1.7 | Bad sender's mailbox address syntax |
X.1.8 | Bad sender's system address |
X.2.0 | Other or undefined mailbox status |
X.2.1 | Mailbox disabled, not accepting messages |
X.2.2 | Mailbox full |
X.2.3 | Message length exceeds administrative limit |
X.2.4 | Mailing list expansion problem |
X.3.0 | Other or undefined mail system status |
X.3.1 | Mail system full |
X.3.2 | System not accepting network messages |
X.3.3 | System not capable of selected features |
X.3.4 | Message too big for system |
X.3.5 | System incorrectly configured |
X.4.0 | Other or undefined network or routing status |
X.4.1 | No answer from host |
X.4.2 | Bad connection |
X.4.3 | Directory server failure |
X.4.4 | Unable to route |
X.4.5 | Mail system congestion |
X.4.6 | Routing loop detected |
X.4.7 | Delivery time expired |
X.5.0 | Other or undefined protocol status |
X.5.1 | Invalid command |
X.5.2 | Syntax error |
X.5.3 | Too many recipients |
X.5.4 | Invalid command arguments |
X.5.5 | Wrong protocol version |
X.6.0 | Other or undefined media error |
X.6.1 | Media not supported |
X.6.2 | Conversion required and prohibited |
X.6.3 | Conversion required but not supported |
X.6.4 | Conversion with loss performed |
X.6.5 | Conversion Failed |
X.7.0 | Other or undefined security status |
X.7.1 | Delivery not authorized, message refused |
X.7.2 | Mailing list expansion prohibited |
X.7.3 | Security conversion required but not possible |
X.7.4 | Security features not supported |
X.7.5 | Cryptographic failure |
X.7.6 | Cryptographic algorithm not supported |
X.7.7 | Message integrity failure |
Reasons for SMTP errors
Just as there are a multitude of SMTP codes, they also come from a multitude of possible causes. These are the most commonly observed:
- Unknown users. Sending to inactive email accounts leads to permanent SMTP errors that are handled as hard bounces Hard bounces occur when an email cannot be delivered due to a permanent error (for example because the email address no longer exists)..
- Suspected sending of spam. The spam filter and/or reputation metrics of an ISP Stands for "internet service provider" or mailbox provider have detected bad sender reputation or spammy sending patterns with regard to email content and/or user feedback and rejects your emails with SMTP errors categorized as soft bounces Soft bounces occur when emails cannot be delivered due to temporary problems. This can happen, for example, if a recipient's mailbox is full. Mailboxes that reject mailings via soft bounce may be available again at a later date..
- Incorrect DNS setup. Sending with unauthenticated sender domains may result in SMTP errors classified as soft bounces. See Email authentication and encryption.
- Full mailboxes. Overflowing recipient mailboxes lead to SMTP errors handled as soft bounces.
- Technical failures. Connection or performance issues on the recipient's side are generally treated as transient errors and do not immediately bounce. Optimizely undertakes various delivery attempts and only if these are not successful within several days, they lead to soft bounces.
SMTP errors and bounce issues can be greatly reduced by following the Deliverability best practices.
Optimizely's bounce management recognizes all common SMTP error codes and messages received by the ISPs or mailbox providers and classifies them in the appropriate bounce category. They are regularly reviewed and updated to provide you bounce processing according to the latest industry standards.