This topic gives an introduction to the SMTP protocol and describes status codes and possible reasons for SMTP errors.
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 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.
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
|<domain> Service not available
|Not enough space on the disk
|Recipient's incoming mail queue has been stopped
|Account is over data quota
|The maximum hop count was exceeded for the message
|Requested mail action not taken: mailbox unavailable
|Requested action aborted: local error in processing
|Requested action not taken: insufficient system storage
|An error of your mail server
|Syntax error, command unrecognised
|Syntax error in parameters or arguments
|Command not implemented
|Bad sequence of commands
|Command parameter not implemented
|Bad email address
|Bad email address
|Host server for the recipient’s domain name cannot be found in DNS
|Address type is incorrect
|<domain> does not accept mail
|Size of your mail exceeds the server limits
|The recipient address rejected your message
|Requested action not taken: mailbox unavailable
|User not local
|Requested mail action aborted: exceeded storage allocation
|Requested action not taken: mailbox name not allowed
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
|Other undefined status
|Other address status
|Bad destination mailbox address
|Bad destination system address
|Bad destination mailbox address syntax
|Destination mailbox address ambiguous
|Destination address valid
|Destination mailbox has moved, No forwarding address
|Bad sender's mailbox address syntax
|Bad sender's system address
|Other or undefined mailbox status
|Mailbox disabled, not accepting messages
|Message length exceeds administrative limit
|Mailing list expansion problem
|Other or undefined mail system status
|Mail system full
|System not accepting network messages
|System not capable of selected features
|Message too big for system
|System incorrectly configured
|Other or undefined network or routing status
|No answer from host
|Directory server failure
|Unable to route
|Mail system congestion
|Routing loop detected
|Delivery time expired
|Other or undefined protocol status
|Too many recipients
|Invalid command arguments
|Wrong protocol version
|Other or undefined media error
|Media not supported
|Conversion required and prohibited
|Conversion required but not supported
|Conversion with loss performed
|Other or undefined security status
|Delivery not authorized, message refused
|Mailing list expansion prohibited
|Security conversion required but not possible
|Security features not supported
|Cryptographic algorithm not supported
|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.
- Suspected sending of spam. The spam filter and/or reputation metrics of an ISP 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.
- 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.