Sign In
Deliverability

Need to know how to check bounced emails?

How to Check Bounced Emails: A Technical Guide

Email deliverability is crucial for effective communication. Bounced emails, also known as delivery failures, indicate problems in sending your messages. Understanding how to check and interpret bounce messages is essential for maintaining a healthy sender reputation and ensuring your emails reach their intended recipients. This article provides a detailed technical guide on how to effectively check bounced emails, interpret bounce codes, and implement strategies to improve your email delivery rates.

Understanding Bounce Email Types and Their Significance

How to check bounced emails - Illustration depicting the different types of email bounces: hard bounce, soft bounce, and general errors, with short explanations of each.

Bounced emails can be broadly classified into two main categories: hard bounces and soft bounces. Understanding the difference between these types is critical for diagnosing the underlying issues and implementing appropriate solutions. Hard bounces represent permanent delivery failures, while soft bounces indicate temporary problems that may resolve themselves over time. Correctly identifying bounce types allows for efficient list management and prevents repeated attempts to send emails to invalid addresses, which can negatively impact your sender reputation.

Hard Bounces: Permanent Delivery Failures

Hard bounces indicate that an email could not be delivered due to a permanent reason. Common causes include invalid email addresses, non-existent domains, or the recipient’s email server permanently blocking the sender. It’s crucial to immediately remove hard-bounced addresses from your mailing list to avoid future sending attempts. Sending emails to these addresses repeatedly can harm your sender reputation and lead to your emails being marked as spam. Example 1: Invalid Email Address

If an email address is misspelled or does not exist, the mail server will return a hard bounce. For example, attempting to send an email to `invalidemail@example.con` (note the incorrect `.con` TLD) will likely result in a hard bounce.
Subject: Delivery Status Notification (Failure)
From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com

Delivery to the following recipient failed permanently:

    invalidemail@example.con

Technical details of permanent failure: 
    Recipient address rejected: User unknown in virtual alias table
This bounce message indicates that the recipient’s email address is not recognized on the `example.con` domain, resulting in a permanent failure. It’s a clear indication of a hard bounce. Example 2: Non-Existent Domain

Sending an email to an address with a domain that no longer exists (e.g., `user@nonexistentdomain.com`) will also result in a hard bounce. The mail server will be unable to locate the domain and will return an error message.
Subject: Delivery Status Notification (Failure)
From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com

Delivery to the following recipient failed permanently:

    user@nonexistentdomain.com

Technical details of permanent failure:
    Domain nonexistentdomain.com does not exist
The bounce message explicitly states that the domain `nonexistentdomain.com` does not exist, confirming a hard bounce. This information should be used to remove the address from your mailing list.

Soft Bounces: Temporary Delivery Issues

Soft bounces indicate that an email could not be delivered due to a temporary issue. These issues can include a full recipient mailbox, a temporary server outage, or the recipient’s server being temporarily unavailable. While a soft bounce doesn’t necessarily mean the email address is invalid, repeated soft bounces should be investigated. A recipient consistently experiencing a full mailbox might indicate that the address is no longer actively monitored. Example 1: Full Mailbox

If a recipient’s mailbox is full, the mail server will return a soft bounce message. This indicates that the email address is valid, but the recipient cannot receive new messages until they free up space.
Subject: Delivery Status Notification (Failure)
From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com

Delivery to the following recipient failed temporarily:

    user@example.com

Technical details of temporary failure:
    The recipient's mailbox is full and is currently unable to accept new messages.
This bounce message clearly indicates that the recipient’s mailbox is full, resulting in a temporary delivery failure. Subsequent sending attempts might succeed if the recipient clears their mailbox. Example 2: Temporary Server Outage

A temporary server outage on the recipient’s end can also cause a soft bounce. The mail server will be temporarily unavailable, preventing the delivery of the email.
Subject: Delivery Status Notification (Failure)
From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com

Delivery to the following recipient failed temporarily:

    user@example.com

Technical details of temporary failure:
    Host or domain name not found. Name service error for name=example.com type=A: Host not found
This bounce message suggests a temporary DNS resolution issue, indicating that the recipient’s server (`example.com`) was temporarily unavailable. Retrying the delivery later might resolve the issue. Expert Tip: Implement a bounce management system that automatically distinguishes between hard and soft bounces. This will allow you to automatically remove hard bounces from your list and retry sending to soft bounces after a certain period.

Analyzing Bounce Codes and SMTP Status Codes

How to check bounced emails - A table explaining common SMTP status codes (e.g., 550, 552, 450, 451) and their meanings in the context of bounced emails. Focus on the most frequently encountered codes.

Bounce messages often include SMTP (Simple Mail Transfer Protocol) status codes that provide more detailed information about the reason for the delivery failure. Understanding these codes can help you pinpoint the exact issue and take appropriate corrective actions. These codes are typically three-digit numbers that indicate the outcome of the email delivery attempt. The first digit indicates the category of the response (e.g., success, permanent failure, temporary failure), while the subsequent digits provide more specific information.

Common SMTP Status Codes

Here’s a breakdown of some of the most common SMTP status codes encountered in bounce messages:
  • 5xx: Permanent Failure – These codes indicate that the email could not be delivered and will not be retried. Examples include 550, 552, and 554.
  • 4xx: Temporary Failure – These codes indicate a temporary problem that might be resolved in the future. The sending server should retry the delivery. Examples include 421, 450, and 451.
  • 2xx: Success – These codes indicate that the email was successfully delivered. A common example is 250.
Example 1: 550 – User Unknown

The SMTP status code 550 typically indicates that the recipient’s email address does not exist on the target server. This is a common hard bounce reason. The detailed error message usually accompanies the status code to provide more context.
Subject: Delivery Status Notification (Failure)
From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com

Delivery to the following recipient failed permanently:

    nonexistentuser@example.com

Technical details of permanent failure:
    550 5.1.1 <nonexistentuser@example.com>: Recipient address rejected: User unknown in virtual alias table
The “550 5.1.1” code, along with the “User unknown” message, confirms that the email address `nonexistentuser@example.com` does not exist and should be removed from the mailing list. Example 2: 450 – Mailbox Unavailable

The SMTP status code 450 usually indicates a temporary problem with the recipient’s mailbox, such as it being temporarily unavailable or over quota. This is a typical soft bounce reason.
Subject: Delivery Status Notification (Failure)
From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com

Delivery to the following recipient failed temporarily:

    user@example.com

Technical details of temporary failure:
    450 4.2.1 Mailbox unavailable, try again later
The “450 4.2.1” code, coupled with the “Mailbox unavailable, try again later” message, suggests a temporary issue. The sending server should retry the delivery after a reasonable delay. Example 3: 554 – Transaction Failed

The SMTP status code 554 often indicates a policy rejection or a problem with the message content that violates the recipient’s server’s rules. This can be due to spam filtering, blacklisting, or other security measures.
Subject: Delivery Status Notification (Failure)
From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com

Delivery to the following recipient failed permanently:

    user@example.com

Technical details of permanent failure:
    554 5.7.1 <user@example.com>: Recipient address rejected: Policy rejection
The “554 5.7.1” code, along with the “Policy rejection” message, suggests that the email was rejected due to the recipient’s server’s policies. This may require investigating the message content or sender reputation.
SMTP Status CodeDescriptionTypeAction
550User unknownHard BounceRemove from list
450Mailbox unavailableSoft BounceRetry delivery
552Exceeded storage allocationHard/Soft BounceConsider hard bounce after multiple failures
421Service not available, closing transmission channelSoft BounceRetry delivery
554Transaction failedHard BounceInvestigate content/reputation; remove if persistent
250Requested mail action okay, completedSuccessEmail delivered
Expert Tip: Keep a regularly updated list of SMTP codes and their meanings handy. Many email service providers (ESPs) provide comprehensive documentation on bounce codes specific to their systems. Familiarizing yourself with these resources will significantly improve your troubleshooting skills. RFC 5321 provides detailed specifications on SMTP and related status codes.

Methods for Checking Bounced Emails

There are several methods for checking bounced emails, ranging from manual analysis to automated bounce processing. The best approach depends on the volume of emails you send and the level of detail you require in your bounce analysis. Manual checking is suitable for low-volume senders, while automated solutions are essential for large-scale email campaigns. Choosing the right method can significantly improve the efficiency of your email deliverability monitoring efforts.

Manual Bounce Email Analysis

Manual bounce email analysis involves directly examining the bounce messages returned by mail servers. This method is suitable for low-volume email senders who can afford the time to review each bounce message individually. It requires a good understanding of SMTP status codes and the structure of bounce notifications. While time-consuming, manual analysis provides a detailed view of each delivery failure and can help identify patterns that might be missed by automated systems. Example 1: Checking Bounce Messages in Gmail

If you’re sending emails from a Gmail account, you can manually check for bounce messages in your inbox. Look for emails with subjects like “Delivery Status Notification (Failure)” or “Mail Delivery System.” These messages typically contain the bounce reason and SMTP status code. Steps:

  • Log in to your Gmail account.
  • Search for emails with the subject “Delivery Status Notification (Failure)” or “Mail Delivery System”.
  • Open each bounce message and analyze the details, including the SMTP status code and the error message.
  • Identify the type of bounce (hard or soft) based on the error message and status code.
Example 2: Analyzing Bounce Message Headers

Examining the headers of a bounce message can provide valuable information about the delivery path and the point of failure. The headers often contain details about the servers involved in the email transmission and any errors encountered along the way. To view the headers in Gmail:

  • Open the bounce message.
  • Click on the three vertical dots (More options) next to the reply button.
  • Select “Show original”.
  • Analyze the headers for any error messages or unusual entries.
Delivered-To: yourname@yourdomain.com
Received: by 10.25.48.135 with SMTP id x3csp65432ybb;
        Tue, 25 Jul 2024 14:25:36 -0700 (PDT)
Return-Path: <mailer-daemon@yourdomain.com>
Received: from mail.yourdomain.com (mail.yourdomain.com. [192.168.1.100])
        by mx.google.com with ESMTPS id z6si234567ybb.123.2024.07.25.14.25.35
        for <yourname@yourdomain.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 25 Jul 2024 14:25:35 -0700 (PDT)
Message-ID: <5f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c@mail.yourdomain.com>
Subject: Delivery Status Notification (Failure)
To: yourname@yourdomain.com
In this example, the headers show the path the email took from the sending server (`mail.yourdomain.com`) to the receiving server (`mx.google.com`). Any errors encountered along this path would be indicated in the headers.

Using Email Clients with Bounce Handling Features

Some email clients, such as Mozilla Thunderbird, provide built-in features for handling bounced emails. These features can automatically identify bounce messages and extract relevant information, such as the bounce reason and the recipient’s email address. This can significantly reduce the manual effort required to analyze bounced emails. Example 1: Setting up Bounce Handling in Thunderbird

Thunderbird offers extensions and configurations that can assist in automatically processing bounced emails. While not as robust as dedicated bounce processing services, it’s a step up from manual analysis. Steps:

  • Install the “Mailbox Alert” extension. This extension can help identify emails with specific subjects, like bounce notifications.
  • Create a filter to automatically move bounce messages to a dedicated folder. This helps keep your inbox clean.
  • Manually review the folder periodically, using the Mailbox Alert to highlight new bounces.
Example 2: Extracting Bounce Information with Regular Expressions

Advanced users can use regular expressions to extract specific information from bounce messages, such as the recipient’s email address and the SMTP status code. This requires some technical knowledge but can automate the process of identifying and categorizing bounced emails. For example, you can use a regular expression to extract the email address from a bounce message like this:

From: Mail Delivery System <mailer-daemon@yourdomain.com>
To: yourname@yourdomain.com
Subject: Delivery Status Notification (Failure)

Delivery to the following recipient failed permanently:

    user@example.com

Technical details of permanent failure:
    550 5.1.1 <user@example.com>: Recipient address rejected: User unknown in virtual alias table
A regular expression like `([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})` can be used to extract the email address `user@example.com` from the message body.

Automated Bounce Processing Services and APIs

For high-volume email senders, automated bounce processing services and APIs are essential. These services automatically parse bounce messages, identify bounce types, and provide detailed reports on email deliverability. They integrate with your email sending infrastructure and can automatically update your mailing lists by removing hard-bounced addresses. This ensures a clean and healthy mailing list, improving your sender reputation and deliverability rates. Examples include SendGrid, Mailgun, and Amazon SES. Example 1: Using SendGrid’s Bounce API

SendGrid provides a robust API for handling bounced emails. You can configure your SendGrid account to send bounce notifications to a webhook endpoint, which you can then process to update your mailing lists. Steps:

  • Set up a webhook endpoint on your server to receive bounce notifications from SendGrid.
  • Configure SendGrid to send bounce notifications to your webhook endpoint.
  • Implement logic in your webhook endpoint to parse the bounce notifications and update your mailing lists accordingly.
// Example PHP code for processing SendGrid bounce notifications
<?php
  $data = json_decode(file_get_contents('php://input'), true);

  foreach ($data as $event) {
    if ($event['event'] == 'bounce') {
      $email = $event['email'];
      $reason = $event['reason'];
      // Remove $email from your mailing list
      // Log the bounce reason
      echo "Bounce: " . $email . " - " . $reason . "\n";
    }
  }
?>
This PHP code snippet demonstrates how to process bounce notifications from SendGrid. It extracts the email address and reason for the bounce and then performs the necessary actions, such as removing the email address from the mailing list. Example 2: Using Mailgun’s Webhooks

Mailgun also offers a similar webhook functionality for handling bounced emails. You can configure Mailgun to send bounce notifications to a webhook endpoint on your server, allowing you to automate the process of updating your mailing lists. Steps:

  • Create a webhook endpoint on your server to receive bounce notifications from Mailgun.
  • Configure Mailgun to send bounce notifications to your webhook endpoint.
  • Implement logic in your webhook endpoint to parse the bounce notifications and update your mailing lists.
# Example Python code for processing Mailgun bounce notifications
from flask import Flask, request

app = Flask(__name__)

@app.route('/mailgun_webhook', methods=['POST'])
def mailgun_webhook():
    data = request.form
    event = data.get('event')
    if event == 'bounced':
        email = data.get('recipient')
        description = data.get('description')
        # Remove email from your mailing list
        # Log the bounce description
        print(f"Bounce: {email} - {description}")
    return "OK", 200

if __name__ == '__main__':
    app.run(debug=True, port=5000)
This Python code snippet demonstrates how to process bounce notifications from Mailgun. It extracts the recipient’s email address and a description of the bounce and then performs the necessary actions.

Improving Email Deliverability and Reducing Bounce Rates

Reducing bounce rates is crucial for maintaining a healthy sender reputation and ensuring your emails reach their intended recipients. Improving email deliverability involves implementing several best practices, including list hygiene, email authentication, content optimization, and monitoring your sender reputation. By taking these steps, you can significantly reduce your bounce rates and improve the overall effectiveness of your email campaigns.

Maintaining a Clean Mailing List

Regular list hygiene is essential for reducing bounce rates. This involves removing invalid email addresses, unsubscribed users, and inactive recipients from your mailing list. A clean mailing list ensures that you’re only sending emails to valid and engaged recipients, which improves your sender reputation and deliverability rates. Example 1: Implementing a Double Opt-In Process

Double opt-in requires users to confirm their email address before being added to your mailing list. This ensures that the email address is valid and that the user genuinely wants to receive your emails. It significantly reduces the risk of adding invalid or typoed email addresses to your list. Steps:

  • When a user signs up for your mailing list, send them a confirmation email.
  • The confirmation email should contain a link that the user must click to verify their email address.
  • Only add the user to your mailing list after they have clicked the confirmation link.
Example 2: Regularly Removing Inactive Subscribers

Identify and remove subscribers who haven’t engaged with your emails for a certain period (e.g., six months or a year). Inactive subscribers can negatively impact your deliverability rates and sender reputation. Steps:

  • Track email engagement metrics, such as opens and clicks.
  • Identify subscribers who haven’t opened or clicked on any of your emails in the past six months.
  • Send a re-engagement email to these subscribers, asking if they still want to receive your emails.
  • Remove subscribers who don’t respond to the re-engagement email from your mailing list.

Email Authentication: SPF, DKIM, and DMARC

Email authentication protocols, such as SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail), and DMARC (Domain-based Message Authentication, Reporting & Conformance), help verify the authenticity of your emails and prevent spoofing. Implementing these protocols can significantly improve your email deliverability rates by assuring email providers that your emails are legitimate. Example 1: Setting up SPF Records

SPF records specify which mail servers are authorized to send emails on behalf of your domain. This helps prevent spammers from forging your email address and sending unauthorized emails. Steps:

  • Identify the mail servers that you use to send emails. This may include your own mail server, your ESP’s mail servers, or other third-party mail servers.
  • Create an SPF record that lists these mail servers as authorized senders.
  • Publish the SPF record in your domain’s DNS settings.
  • Example SPF record:

    v=spf1 include:sendgrid.net include:mailgun.org -all
    This SPF record authorizes SendGrid and Mailgun to send emails on behalf of your domain. The `-all` mechanism indicates that any other mail servers are not authorized. Example 2: Configuring DKIM Records

    DKIM adds a digital signature to your emails, which can be used to verify that the email hasn’t been tampered with during transit. This helps prevent man-in-the-middle attacks and ensures that your emails are delivered securely. Steps:

  • Generate a DKIM key pair. This typically involves generating a private key and a public key.
  • Configure your mail server to sign outgoing emails with the private key.
  • Publish the public key in your domain’s DNS settings.
  • Example DKIM record:

    default._domainkey.yourdomain.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD...";
    This DKIM record contains the public key that receiving mail servers can use to verify the DKIM signature of your emails. Example 3: Implementing DMARC Policies

    DMARC allows you to specify how receiving mail servers should handle emails that fail SPF and DKIM authentication. This helps prevent phishing attacks and ensures that your emails are delivered according to your policies. Steps:

  • Define your DMARC policy. This specifies how receiving mail servers should handle emails that fail SPF and DKIM authentication. Common policies include “none”, “quarantine”, and “reject”.
  • Publish the DMARC record in your domain’s DNS settings.
  • Example DMARC record:

    _dmarc.yourdomain.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com; ruf=mailto:dmarc-forensic@yourdomain.com;";
    This DMARC record specifies a policy of “none”, which means that receiving mail servers should not take any action on emails that fail SPF and DKIM authentication. It also specifies email addresses for receiving aggregate and forensic reports. The `p=quarantine` setting would instruct receiving servers to place failing emails in the spam folder, while `p=reject` would tell them to reject the emails outright. Start with `p=none` to monitor and adjust as needed.

    Optimizing Email Content

    The content of your emails can also impact your deliverability rates. Avoid using spam trigger words, excessive formatting, or large attachments. Optimize your email content for readability and relevance to your audience. Provide clear unsubscribe options and respect recipient preferences. Example 1: Avoiding Spam Trigger Words

    Certain words and phrases are commonly associated with spam and can trigger spam filters. Avoid using these words in your email subject lines and body content. Examples include “free”, “discount”, “guarantee”, “urgent”, and “limited time offer”.

    Example 2: Using Plain Text Alternatives

    Always provide a plain text alternative to your HTML emails. Some recipients may prefer to receive emails in plain text, and some mail servers may filter HTML emails as spam. Providing a plain text alternative ensures that your message is accessible to all recipients. Example 3: Limiting Image Sizes and Ratios

    Large images can cause emails to load slowly and may trigger spam filters. Optimize your images for web use by reducing their file size and using appropriate file formats (e.g., JPEG or PNG). Avoid using excessive images or large image-to-text ratios.

    “Email deliverability is a marathon, not a sprint. Consistently applying best practices and monitoring your results is key to long-term success.” – Email Deliverability Expert

    Share this article