Bounce Processing

Bounce Processing

Bounce Processing

Identifying invalid email addresses or delivery problems in email marketing is very important. Without bounce processing, no matter how promising email delivery system you have, it will fail soon or later.

Bounce processing is all about monitoring email delivery processes and logging responses. There are two types of responses:

  • Synchronous bounces
  • Asynchronous bounces

Synchronous Bounces

Synchronous bounces occur during the SMTP transfer of emails. When you send an email campaign, Octeth will render the email for each recipient and transfer it to the delivery server. Your delivery server will queue it for the recipient email address MX (Mail Exchange) server. Then your delivery server will connect to the recipient MX server and perform the greeting. Once the greeting process is completed, your delivery server will pass the email to the recipient MX server. During this transfer, the recipient MX server may return an error. This is called “Synchronous Bounce”. When an error occurs, your delivery server will close the connection and log the error.

Some MX servers may return synchronous bounces while other MX servers may return asynchronous bounces.

Asynchronous Bounces

Some MX servers accept the transferred email without returning any error. In this case, the recipient MX server sends a delivery status notification (DSN) report email to the sender email address.

The sender email address is the “MAIL FROM” (or in other words, “return-path”) email address and this email address will receive the DSN report email.

⚠️
Processing bounce reports is very important for keeping a consistent and succesful email delivery process. Sending emails to bounced email addresses repeatedly will ruin your email delivery reputation and soon or later, you will struggle delivering emails to your recipients.

Bounce Processing Methods

Incoming bounce reports (DSN reports) can be processed in various ways. You can pick any of these methods and apply to your setup.

Octeth Bounce Processing

Octeth includes a built-in bounce processing SMTP server. When you install Octeth on your server, port 25 and 587 will be assigned to this bounce processing module and whenever an email is received, it will check if it’s a bounce (DSN) report email or not. If it’s a bounce report email, it will pass it through bounce pattern checker to identify if it’s a hard bounce (permanent error) or soft bounce (temporary error).

When a hard bounced email address is detected, Octeth will take following actions:

  • Mark the corresponding email address as “Hard Bounced”
  • Unsubscribe the email address from the list
  • Add the email address to the suppression list

In order to use the Octeth Bounce Processing feature, simply set MX records of your MAIL FROM (a.k.a return-path) email address domains to your Octeth server.

Here’s an example setup:

Octeth Server IP Address: 100.100.100.100
MAIL FROM (return-path) Domain: mysenderdomain.com

mysenderdomain.com MX (Priority 10) mx.mysenderdomain.com
mx.mysenderdomain.com A 100.100.100.100

This DNS setup will ensure that incoming bounce (DSN) report emails to MAIL FROM email addresses are captured by Octeth and processed.

In order to customize your bounce patterns, go to [Admin Area → Bounce Processing] section and click “Bounce Patterns”. On this section, you can add/remove bounce patterns and classify these patterns as “hard” or “soft” bounce.

image

Here’s an example pattern:

550 5.7.1 Unfortunately, messages from==>Hard

This bounce pattern will match any DSN error that contains 550 5.7.1 Unfortunately, messages from and mark corresponding email addresses as Hard Bounced.

Mailbox Bounce Processing

Another way of processing bounces is to collect them inside a mailbox and then process them using a third party mailbox scanner solution. In order to setup this approach, first you must setup a Mailbox which will allow incoming emails to your MAIL FROM (return-path) email addresses.

Once this is done, the next step is to set the MX record of your MAIL FROM (return-path) email address domains to the MX address of the mailbox.

Once this setup is completed, all bounces will be delivered to the mailbox and you will be able to browse them on your email client or process by using a third party mailbox scanner script.

Detected hard bounces by the third party script must be imported into the Oempro database. The following process is recommended:

  1. Add the hard bounced email address to the suppression list (important!)
  2. Unsubscribe the email address from the corresponding list
  3. Mark the email address as hard bounced

PowerMTA Bounce Processing

In order to handle incoming async and sync bounces via PowerMTA, first you must set MX records of your sender domains to your PowerMTA server. Secondly, you need to install Logstash tool to the PowerMTA server.

Logstash is an easy-to-use and leightweight log processing tool. With the help of Logstash, we will monitor PowerMTA bounce log files and push them to the Oempro backend.

In order to install Logstash, please visit https://www.elastic.co/logstash/. Logstash can be installed on Ubuntu with the following command:

apt install logstash

Once Logstash is installed and running, the next step is creating the Logstash configuration file. To get your customized Logstash configuration file, go to [Admin Area → Settings → Bounce Processing] and click “Integration” tab:

image

Copy the customized Logstash configuration file and save it as /etc/logstash/conf.d/oempro.yml file. Restart your Logstash.

As the last step, edit your PowerMTA configuration file and paste the accounting directives as displayed on the screen above. Here’s an example:

<acct-file /var/log/pmta/bounces.csv>
        move-interval 1h
        move-to /var/log/pmta/accounting/bounces/
        records b, rb
        record-fields b timeQueued,timeLogged,orig,rcpt,bounceCat,dsnStatus,dsnAction,dsnDiag,dsnMta,jobId,vmta,header_X-FBLId
        record-fields rb timeLogged,orig,rcpt,bounceCat,dsnStatus,dsnAction,dsnDiag,dsnMta,header_X-FBLId
        world-readable yes
</acct-file>

<acct-file /var/log/pmta/fbl.csv>
        move-interval 24h
        move-to /var/log/pmta/accounting/fbl/
        records feedback-loop
        record-fields f timeLogged,format,header_To,header_Return-Path,reportedDomain,header_X-FBLId
        world-readable yes
</acct-file>

Once Logstash is restarted, it will start monitoring bounces.csv and fbl.csv PowerMTA accounting files and push them to your Oempro.

💠
image

Footer Social Icons

©Copyright Octeth, Inc. All rights reserved.