Bounce Processing

Bounce Processing

Bounce Processing

What is bounce processing?

When you send an email to an email address, if the recipient email address is invalid or has a problem such as technical issues, the email will be returned to the sender. Just like in the real world, when you send a mail to someone but if the recipient address is invalid or if that person doesn’t live on that address any more, the mail will be returned to you. It’s the same case with the bounce processing in email delivery.

Why is bounce processing important?

There are tons of valuable information in “Deliverability” section about this topic but when it comes to successful email delivery, your “sender reputation” matters a lot. And your sender reputation is built based on many factors. Sending email to invalid email addresses and doing this repeatedly is one of the most effective way to ruin(!) your sender reputation.

Therefore, if you are looking for a way to build a long-lasting, consistent email marketing operation, you need to pay attention to bounce processing. Whenever a bounce (invalid email delivery) occurs, you must detect this and remove that recipient email address from your lists.

What does high bounce rate mean?

The short answer is; “you have collected email addresses without getting their permission to send emails”. The long answer is; you have a email list with poor quality. There might be out-of-date email addresses which do not exist any more, or email addresses which are idle for years but they have been turned into “spam traps” by ISP’s. Of you have an email list with no opt-in confirmation which has resulted your competitors and hackers to subscribe many invalid or spam trap emails to your email lists.

If you have high bounce rate and if you are not getting rid of those email addresses in your email lists, then you have a big problem. You will never be able to build a sustainable email delivery reputation. Your email marketing campaigns will suffer, you will get lower opens and clicks and most of your emails will either be rejected by recipient mail servers or your emails will end in the spam folder.

How does a bounce occur?

This diagram shows an example email delivery from your SMTP server to the recipient SMTP server and then possible ways of bounce reporting.
This diagram shows an example email delivery from your SMTP server to the recipient SMTP server and then possible ways of bounce reporting.

When you create and send an email campaign in Oempro, or an autoresponder is triggered and delivered to the subscriber, Oempro first renders the email according to RFC standards. Email headers, email body parts and other required parameters are rendered to make sure that the email is ready to be delivered to the recipient email address.

The next step is to delivery the rendered email to your SMTP email delivery server. Once it’s received by your SMTP server, it checks the recipient email address, finds the SMTP server of the recipient and performs a connection to the recipient SMTP server to deliver the email.

Bounce report can occur in two different ways:

  1. Synchronous bounce
  2. During the delivery of the email from your SMTP server to the recipient SMTP server, if there’s a problem (such as invalid email address, over-quota mailbox, etc.), the recipient SMTP server will reject the email delivery and it will return a delivery status notification (DSN) code. These codes can be either 4.x.x or 5.x.x codes. RFC#3463 defines these DSN codes.

    Here’s an example to the sync bounce report:

    image
  3. Asynchronous bounce The recipient SMTP server may accept the email with 2.x.x success DSN code but then it may send a DSN email to the “sender” email address with the error report. The error DSN code and explanation can be included in this report email.
  4. Here’s an example to the async bounce report:

    image

Bounced email types

There are two bounced email types:

  1. Permanent bounces (a.k.a. hard bounces)
    1. This bounce type returns a 5.x.x DSN code and it means that there’s no reason to continue sending to this recipient email address. The problem is permanent. Some example reasons;

    2. Invalid email address
    3. Invalid domain MX
    4. Spam blacklisting related rejections
  2. Temporary bounces (a.k.a. soft bounces)
    1. This bounce type returns a 4.x.x DSN code and it means that there’s a temporary problem with the recipient email address or recipient mail server and if you try again in following hours, it will be okay. Some example reasons;

    2. Over-quota mailbox
    3. Temporary DNS resolution
    4. Temporary technical problems with the SMTP server

The important thing here is, you should immediately stop sending to hard bounces but continue sending to soft bounces. Oempro has capability to identify hard bounces and perform bounce processing only for hard bounced email addresses.

What needs to be done?

Both sync and async bounces must be processed and those related recipient email addresses must be removed from your subscriber lists. Otherwise, you will continue sending emails to these recipients and consistent delivery attempts to invalid email addresses will damage your email delivery reputation quickly.

Setting up bounce processing

In this section, we will cover both async and sync bounce processing setup.

Async bounce processing setup

For async bounce processing, Oempro includes a built-in inbound SMTP server. In order to make this module work, you need to setup MX record of your delivery server MFROM domains point to your Oempro domain.

Please refer to Delivery Servers settings for more information about setting up your delivery servers and MFROM domains.

If your Oempro domain is oempro.yourdomain.com, you need to set this domain as “MX” record for your delivery server MFROM domains. Let’s say your delivery server MFROM domain is senderdomain.com. Then you need to set the following DNS record:

senderdomain.com MX (Priority:10) oempro.yourdomain.com

This will make sure that when you send an email and async bounce occurs, the async bounce DSN email will be sent to the Oempro domain.

On port 25, Oempro’s built-in async bounce SMTP server is running and it will greet any incoming connections for DSN email delivery.

However, to avoid open relay security breach, Oempro will reject any email delivery attempts with an unknown recipient email address domain. To “whitelist” your sender domains and “whitelist” them, go to [Admin Area → Settings → Email Delivery] and under “Email Delivery” tab, scroll down to the “Relay Domains” list.

Enter your MFROm domains to this field, one domain per new line:

image

Once you set your relay domains, the next step is to reload SMTP server settings. On the Oempro server in SSH connection, type the following command:

docker exec -ti oempro_bounce supervisorctl restart all
docker exec -ti oempro_app supervisorctl restart all
docker exec -ti oempro_system supervisorctl restart all

Once this setup is completed, your async bounce system will start working.

To setup bounce processing rules, go to [Admin Area → Drop Down Menu → Bounce Processing] section:

image

On the “Bounce Processing” section, you will see your daily bounce processing statistics:

image

Under “Bounce Patterns” tab, you can see the list of pre-defined patterns. When a DSN report email is received, Oempro scans the email content for each one of these patterns and try to classify it as “soft” or “hard” bounce report.

You can customize these patterns, add your new patterns. You can find pre-defined patterns below:

was not delivered to==>Hard
This is a permanent error==>Hard
Remote host said: 550 5.1.1 No such user==>Hard
This is a permanent error; I've given up. Sorry it didn't work out.==>Hard
PERM_FAILURE:==>Hard
User unknown==>Hard
UNKNOWN_USER: No such user==>Hard
mailbox unavailable==>Hard
Requested action not taken: mailbox unavailable==>Hard
Action: failed==>Hard
User unknown in virtual alias table==>Hard
invalid mailbox==>Hard
couldn't find any host named==>Hard
invalid address==>Hard
user unknown==>Hard
this user doesn't have a yahoo.com account==>Hard
permanent fatal errors==>Hard
No mailbox here by that name==>Hard
User not known==>Hard
Remote host said: 553==>Hard
No such user==>Hard
No such recipient==>Hard
unknown user==>Hard
mailbox not found==>Hard
No such user here==>Hard
Delivery to the following recipients failed==>Hard
unknown or illegal alias==>Hard
not listed in domino directory==>Hard
unrouteable address==>Hard
Destination server rejected recipients==>Hard
unable to validate recipient==>Hard
No such virtual user here==>Hard
The recipient cannot be verified==>Hard
bad address ==>Hard
Recipient unknown==>Hard
mailbox is currently unavailable==>Hard
user mailbox is inactive==>Soft
Invalid User==>Hard
recipient rejected==>Hard
invalid recipient==>Hard
not our customer==>Hard
Unknown account ==>Hard
This user doesn't have a ==>Hard
no users here by that name==>Hard
account closed==>Hard
user not found==>Hard
This address no longer accepts mail==>Hard
does not like recipient==>Hard
Delivery to the following recipient failed permanently==>Hard
User Does Not Exist==>Hard
The mailbox is not available on this system==>Hard
mailbox (.*) does not exist==>Hard
not a valid mailbox==>Hard
server doesn't handle mail for that user==>Hard
No such account ==>Hard
unknown recipient==>Hard
user invalid==>Hard
User reject the mail==>Hard
The following recipients are unknown==>Hard
name or service not known==>Hard
I couldn't find any host named==>Hard
message could not be delivered for \d+ days==>Hard
I couldn't find a mail exchanger or IP address==>Hard
address does not exist==>Hard
relaying denied==>Hard
access denied==>Hard
554 denied==>Hard
they are not accepting mail from==>Hard
Relaying not allowed==>Hard
not permitted to relay through this server==>Hard
Sender verify failed==>Hard
Although I'm listed as a best-preference MX or A for that host==>Hard
mail server permanently rejected message==>Hard
bad address syntax==>Hard
delivery failed; will not continue trying==>Hard
No DNS information was found==>Hard
user account disabled==>Soft
this account has been disabled or discontinued==>Soft
user account is expired==>Soft
User is inactive==>Soft
inactive user==>Soft
extended inactivity new mail is not currently being accepted==>Soft
Sorry, I wasn't able to establish an SMTP connection==>Soft
message refused==>Soft
permission denied==>Soft
mailbox temporarily disabled==>Soft
Blocked address==>Soft
Account inactive as unread==>Soft
Account inactive==>Soft
account expired==>Soft
User hasn't entered during last ==>Soft
Account closed due to inactivity==>Soft
This account is not allowed==>Soft
Mailbox_currently_suspended==>Soft
Mailbox disabled==>Soft
Mailaddress is administratively disabled==>Hard
Mailbox currently suspended==>Hard
Account has been suspended==>Hard
account is not active==>Hard
recipient never logged onto==>Hard
 is disabled==>Hard
account has been temporarily suspended==>Hard
deactivated mailbox==>Hard
disabled due to inactivity==>Hard
not an active address==>Hard
inactive on this domain==>Hard
Status: 5.2.1==>Hard
said: 550 5.2.1==>Hard
account is locked==>Hard
account deactivated==>Hard
disabled mailbox==>Hard
Mailaddress is administrativley disabled==>Hard
unavailable to take delivery of the message==>Hard
550 5.1.1 User unknown==>Hard
said: 553 sorry,==>Hard
 does not exist==>Hard
User unknown in virtual mailbox==>Hard
User is unknown==>Hard
Unrouteable address==>Hard
This address does not receive mail==>Hard
Recipient no longer on server==>Hard
retry timeout exceeded==>Hard
retry time not reached for any host after a long failure period==>Hard
unknown address or alias==>Hard
> does not exist==>Hard
Recipient address rejected==>Hard
Recipient not allowed==>Hard
Address rejected==>Hard
Address invalid==>Hard
Unknown local part==>Hard
Unknown local-part==>Hard
mail receiving disabled==>Hard
bad destination email address==>Hard
deactivated due to abuse==>Hard
no such address==>Hard
user_unknown==>Hard
recipient not found==>Hard
User unknown in local recipient table==>Hard
This recipient e-mail address was not found==>Hard
no valid recipients==>Hard
This user doesn't have a yahoo==>Hard
mailbox not available==>Hard
not a valid user==>Hard
Unknown destination address==>Hard
Unknown address error==>Hard
recipient's account is disabled==>Hard
Unable to chdir to maildir==>Hard
undeliverable to the following==>Hard
invalid domain mailbox user==>Hard
Permanent error in automatic homedir creation==>Hard
Invalid or unknown virtual user==>Hard
Your e-mail has not been delivered==>Hard
Your email has not been delivered==>Hard
Your mail has not been delivered==>Hard
Not a valid recipient==>Hard
Please check the recipients e-mail address==>Hard
email has changed==>Hard
This address is no longer valid==>Hard
unknown email address==>Hard
no longer in use==>Hard
not have a final email delivery point==>Hard
non esiste==>Hard
no recipients==>Hard
permanent fatal delivery==>Hard
address is not valid==>Hard
unavailable mailbox==>Hard
550 5.1.1==>Hard
Status: 5.1.1==>Hard
account does not exist==>Hard
The recipient name is not recognized==>Hard
can't create user output file==>Hard
no such user here==>Hard
There is no user by that name==>Hard
No such mailbox==>Hard
not a recognised email account==>Hard
address is no longer active==>Hard
This is a permanent error. The following address==>Hard
Unable to find alias user==>Hard
sorry, no mailbox==>Hard
doesn't have an account==>Hard
not a valid email account==>Hard
I have now left ==>Hard
I am no longer with==>Hard
Invalid final delivery user==>Hard
no longer available==>Hard
unknown address==>Hard
isn't in my list of allowed recipients==>Hard
recipients are invalid==>Hard
recipient is invalid==>Hard
mailbox is not valid==>Hard
invalid e-mail address==>Hard
doesn't_have_a_yahoo==>Hard
not known at this site==>Hard
email name is not found==>Hard
address doesn't exist==>Hard
destination addresses were unknown==>Hard
no existe==>Hard
does not have an email==>Hard
_does_not_exist_here==>Hard
User unknown in virtual mailbox table==>Hard
user is no longer available==>Hard
unknown user account==>Hard
Addressee unknown==>Hard
This Gmail user does not exist==>Hard
554 delivery error: This user doesn't have==>Hard
No such domain at this location==>Hard
an MX or SRV record indicated no SMTP service==>Hard
I couldn't find any host by that name==>Hard
Domain does not exist; please check your spelling==>Hard
Domain not used for mail==>Hard
Domain must resolve==>Hard
unrouteable mail domain==>Hard
no route to host==>Hard
host not found==>Hard
Host or domain name not found==>Hard
illegal host/domain==>Hard
bad destination host==>Hard
no matches to nameserver query==>Hard
no such domain==>Hard
Cannot resolve the IP address of the following domain==>Hard
too many hops, this message is looping==>Hard
loop: too many hops==>Hard
relay not permitted==>Hard
This mail server requires authentication when attempting to send to a non-local e-mail address.==>Hard
is currently not permitted to relay==>Hard
Unable to relay for==>Hard
not a gateway==>Hard
This system is not configured to relay mail==>Hard
we do not relay==>Hard
relaying mail to==>Hard
Relaying is prohibited==>Hard
Cannot relay==>Hard
relaying disallowed==>Hard
Authentication required for relay==>Hard
5.7.1 Unable to deliver to ==>Hard
message could not be delivered==>Hard
dns loop==>Hard
domain missing or malformed==>Hard
550_Invalid_recipient==>Hard
Invalid Address==>Hard
Bad destination mailbox address==>Hard
quota exceeded==>Soft
user is over quota==>Soft
exceeds size limit==>Soft
user has full mailbox==>Soft
Mailbox disk quota exceeded==>Soft
over the allowed quota==>Soft
User mailbox exceeds allowed size==>Soft
does not have enough space==>Soft
mailbox is full==>Soft
Can't create output==>Soft
mailbox full==>Soft
File too large==>Soft
too many messagens on this mailbox==>Soft
too many messages on this mailbox==>Soft
too many messages in this mailbox==>Soft
Not enough storage space==>Soft
Over quota==>Soft
over the maximum allowed number of messages==>Soft
Recipient exceeded email quota==>Soft
temporarily deferred==>Soft
 is FULL==>Soft
Quota exceeded==>Soft
The user has not enough diskspace available==>Soft
Mailbox has exceeded the limit==>Soft
exceeded storage allocation==>Soft
Quota violation==>Soft
522_mailbox_full==>Soft
account is full==>Soft
incoming mailbox for user ==>Soft
message would exceed quota==>Soft
recipient exceeded dropfile size quota==>Soft
not able to receive any more mail==>Soft
user is invited to retry==>Soft
User account is overquota==>Soft
mailfolder is full==>Soft
exceeds allowed message count==>Soft
message is larger than the space available==>Soft
recipient storage full==>Soft
The user's space has used up.==>Soft
user is over their quota==>Soft
exceed the quota for the mailbox==>Soft
exceed maximum allowed storage==>Soft
Inbox is full==>Soft
over quota==>Soft
maildir has overdrawn his diskspace quota==>Soft
disk full==>Soft
Quota exceed==>Soft
Storage quota reached==>Soft
user overdrawn his diskspace quota==>Soft
exceeded his/her quota==>Soft
quota for the mailbox==>Soft
The incoming mailbox for user==>Soft
exceeded the space quota==>Soft
mail box space not enough==>Soft
insufficient disk space==>Soft
over their disk quota==>Soft
Message would exceed ==>Soft
User is overquota==>Soft
Requested mailbox exceeds quota==>Soft
exceed mailbox quota==>Soft
over the storage quota==>Soft
over disk quota==>Soft
mailbox_quota_exceeded==>Soft
Status: 5.2.2==>Soft
over the maximum allowed mailbox size==>Soft
Delivery failed: Over quota==>Soft
errno=28==>Soft
Your e-mail was rejected for policy reasons on this gateway==>Soft
550 Protocol violation==>Soft
Blacklisted==>Soft
is refused. See http://spamblock.outblaze.com==>Soft
550 Rule imposed mailbox access for==>Soft
Message cannot be accepted, content filter rejection==>Soft
Mail appears to be unsolicited==>Soft
rejected for policy reasons==>Soft
Spam rejected==>Soft
Error: content rejected==>Soft
Message Denied: Restricted attachment==>Soft
Denied by policy==>Soft
has exceeded maximum attachment count limit==>Soft
Blocked for spam==>Soft
Blocked for abuse==>Soft
Message held for human verification==>Soft
considered unsolicited bulk e-mail==>Soft
message held before permitting delivery==>Soft
envelope sender is in my badmailfrom==>Soft
listed in multi.surbl.org==>Soft
black listed url host==>Soft
this message scored ==>Soft
on spam scale==>Soft
message filtered==>Soft
rejected as bulk==>Soft
message content rejected==>Soft
Mail From IP Banned==>Soft
Connection refused due to abuse==>Soft
mail server is currently blocked==>Soft
Spam origin==>Soft
extremely high on spam scale==>Soft
is not accepting mail from this sender==>Soft
spamblock==>Soft
blocked using ==>Soft
HTML tag unacceptable==>Soft
appears to be spam==>Soft
not accepting mail with attachments or embedded images==>Soft
message contains potential spam==>Soft
You have been blocked by the recipient==>Soft
message looks like spam==>Soft
message looks like a spam==>Soft
Message contains unacceptable attachment==>Soft
high spam probability==>Soft
email is considered spam==>Soft
Spam detected==>Soft
Message identified as SPAM==>Soft
blocked because it contains FortiGuard - AntiSpam blocking URL==>Soft
 This message has been blocked because it contains FortiSpamshield blocking URL==>Soft
Sender is on domain's blacklist==>Soft
This message does not comply with required standards==>Soft
Message rejected because of unacceptable content==>Soft
554 Transaction failed==>Soft
5.7.1 reject content==>Soft
5.7.1 URL/Phone Number Filter==>Soft
5.7.1 Message cannot be accepted, spam rejection==>Soft
Mail contained a URL rejected by SURBL==>Soft
This message has been flagged as spam==>Soft
they are not accepting mail==>Soft
550 POSSIBLE SPAM==>Soft
headers consistent with spam==>Soft
5.7.1 Content-Policy reject==>Soft
rejected by an anti-spam==>Soft
rejected by anti-spam==>Soft
is on RBL list==>Soft
sender denied==>Soft
Your message was rejected because it appears to be part of a spam bomb==>Soft
it is spam==>Soft
5.7.1 bulkmail==>Soft
Message detected as spam==>Soft
5.7.1 Blocked==>Soft
identified SPAM==>Soft
Error: SPAM==>Soft
message is banned==>Soft
junk mail==>Soft
bulk mail rejected==>Soft
SPAM not accepted==>Soft
rejected By DCC==>Soft
Spam Detector==>Soft
5.7.1 Message rejected==>Soft
5.7.1 Rejected as SPAM==>Soft
Message rejected due to the attachment filtering policy==>Soft
Message rejected due to content restrictions==>Soft
Spam is not allowed==>Soft
Blocked by policy==>Soft
content filter==>Soft
spam filter==>Soft
filter rejection==>Soft
rejected by spam-filter==>Soft
Forbidden for policy reasons==>Soft
looked like SPAM==>Soft
Message blocked==>Soft
not delivered for policy reasons==>Soft
high on spam==>Soft
5.7.1 Rejected - listed at ==>Soft
invalid message content==>Soft
550 This message scored ==>Soft
Blocked by SPAM==>Soft
This message has been blocked==>Soft
SURBL filtered by ==>Soft
message classified as bulk==>Soft
554 Message rejected==>Soft
mail rejected for spam==>Soft
554 5.7.1 ==>Soft
message that you send was considered spam==>Soft
message that you sent was considered spam==>Soft
554 5.7.0 Reject==>Soft
550 Spam==>Soft
Message rejected==>Soft
550 Rejected==>Soft
Message rejected: Conversion failure==>Soft
Sorry, message looks lik==>Soft
email has been identified as SPAM==>Soft
possible spam==>Soft
550 Content Rejected==>Soft
Message not allowed by spam==>Soft
has been quarantined==>Soft
blocked as spam==>Soft
a stray CR character==>Soft
no longer accepts messages with==>Soft
DNSBL:To request removal of==>Soft
won't accept this email==>Soft
Rejected by filter processing==>Soft
marked by Telerama as SPAM==>Soft
triggered a spam block==>Soft
Message classified as spam by Bogofilter==>Soft
http://postmaster.info.aol.com/errors/421dynt1.html==>Soft
Spam limit has been reached==>Soft
One of the words in the message is blocked==>Soft
Your email has been automatically rejected==>Soft
message from policy patrol email filtering==>Soft
blocked by filter rules==>Soft
Mail rejected by Windows Live Hotmail for policy reasons==>Soft
542 Rejected==>Soft
Remote sending only allowed with authentication==>Soft
550 authentication required==>Soft
sorry, that domain isn't in my list of allowed rcpthosts==>Soft
has installed an invalid MX record with an IP address instead of a domain name on the right hand side.==>Soft
all relevant MX records point to non-existent hosts==>Soft
not capable to receive mail==>Soft
CNAME lookup failed temporarily==>Soft
TLS connect failed: timed out==>Soft
timed out while receiving the initial server greeting==>Soft
malformed or unexpected name server reply==>Soft
unreachable for too long==>Soft
Please receive your mail before sending==>Soft
 but connection died==>Soft
Failed; 4.4.7 (delivery time expired)==>Soft
unable to connect successfully to the destination mail server==>Soft
This message is looping==>Soft
Connection timed out==>Soft
failed on DATA command==>Soft
Can't open mailbox==>Soft
Delivery failed 1 attempt==>Soft
Hop count exceeded==>Soft
Command rejected==>Soft
Unable to create a dot-lock==>Soft
Command died with status==>Soft
550 System error==>Soft
Connection refused==>Soft
Command time limit exceeded==>Soft
Resources temporarily unavailable==>Soft
error on maildir delivery==>Soft
this message has been in the queue too long==>Soft
loops back to myself==>Soft
temporary failure==>Soft
temporary problem==>Soft
Temporary error on maildir delivery==>Soft
The host does not have any mail exchanger==>Soft
5.7.1 Transaction failed==>Soft
delivery temporarily suspended==>Soft
Undeliverable message==>Soft
user path no exist==>Soft
user path does not exist==>Soft
maildir delivery failed==>Soft
Resources temporarily not available==>Soft
has exceeded the max emails per hour==>Soft
several matches found in domino==>Soft
internal software error==>Soft
internal server error==>Soft
cannot store document==>Soft
delivery time expired==>Soft
delivery expired (message too old)==>Soft
operation timed out==>Soft
4.3.2 service shutting down==>Soft
loop count exceeded==>Soft
unable to deliver a message to==>Soft
delivery was refused==>Soft
Too many results returned==>Soft
your "received:" header counts==>Soft
Error in processing==>Soft
Error opening input/output file==>Soft
SC-001 Mail rejected by Windows Live Hotmail for policy reasons.==>Soft
Remote host said: 542 Rejected==>Soft
Remote host said: 554 Failure==>Soft
Could not complete sender verify callout==>Soft
Sender verification error==>Soft
Mail only accepted from IPs with valid reverse lookups==>Soft
lost connection with==>Soft
sender id (pra) not permitted==>Soft
could indicate a mail loop==>Soft
but sender was rejected==>Soft
Address does not pass the Sender Policy Framework==>Soft
only accepts mail from known senders==>Soft
Name service error==>Soft
You will need to add a PTR record (also known as reverse lookup) before you are able to send email into the iiNet network.==>Soft
does not have a valid PTR record associated with it.==>Soft
refused to talk to me: 452 try later==>Soft

The pattern is written on the left side and the classification (either Soft or Hard) is written on the right side. The insert ==> between these parts.

Sync bounce processing setup

In order to process synchronous bounce DSN reports, you need to perform basic integration with your MTA. The integration process will be different based on the MTA you are using. We have explained the sync bounce integration with popular MTA’s below.

Integration with PowerMTA

PowerMTA has capability to log incoming sync bounce DSN reports to a log file. To process these PowerMTA log files and push them to Oemrpo, we will use Logstash. Logstash is a small yet powerful tool which can monitor log files and push them to remote services.

Once you have installed Logstash on your PowerMTA server, make sure that the following Logstash pipeline configuration is set:

####################################
## PowerMTA Logstash Configuration
##
## Octeth, Inc.
##
####################################

# ------------------
# Input
# ------------------
input {
	file {
		type => "pmta"
		tags => "pmta"
		mode => "tail"
		sincedb_path => "/var/log/logstash/sincedb_pmta_logs.db"
		sincedb_write_interval => 5
		ignore_older => 0
		path => [ "/var/log/pmta/bounces-*.csv" ]
	}
}

# ------------------
# Filter
# ------------------
filter {

	# High level filtering
	if [type] == "pmta" {
		if ([message] =~ "^(d),") {
			drop {}
		} else if ([message] =~ "^(b),") {
			csv {
				source => "message"
				columns => [ "logType", "timeQueued", "timeLogged", "orig", "rcpt", "bounceCat", "dsnStatus", "dsnAction", "dsnDiag", "dsnMta", "jobId", "vmta", "header_X-FBLId" ]
				separator => ","
				add_tag => [ "pmta_sync_bounce" ]
				skip_empty_columns => true
			}
		} else if ([message] =~ "^(rb),") {
			csv {
				source => "message"
				columns => [ "logType", "timeLogged", "orig", "rcpt", "bounceCat", "dsnStatus", "dsnAction", "dsnDiag", "dsnMta", "header_X-FBLId" ]
				separator => ","
				add_tag => [ "pmta_async_bounce" ]
				skip_empty_columns => true
			}
		} else if ([message] =~ "^(f),") {
			csv {
				source => "message"
				columns => [ "logType", "timeLogged", "format", "header_To", "header_Return-Path", "reportedDomain", "header_X-FBLId" ]
				separator => ","
				add_tag => [ "pmta_fbl" ]
				skip_empty_columns => true
			}
		} else if ([message] =~ "^(t),") {
			drop {}
		} else if ([message] =~ "^(tq),") {
			drop {}
		}
	} else {
		drop {}
	}
}

# ------------------
# Outputs
# ------------------
output {
#	stdout {}
	http {
		url => "https://<oempro-domain>/system/bounce_webhook?type=pmta"
		http_method => "post"
	}
}

The next step is to edit your PowerMTA configuration file (/etc/pmta/config) and add the following logging directive:

<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>

That’s it. Once you reload your PowerMTA configuration (pmta reload), PowerMTA will start writing incoming sync bounce DSN reports to the bounces.csv file and Logstash will push them to Oempro’s bounce processor.

Integration with Postfix

ℹ️

We haven’t written this article yet. Please contact us if you are interested in learning about this topic.

Integration with GreenArrow

ℹ️

We haven’t written this article yet. Please contact us if you are interested in learning about this topic.

Integration with MailerQ

ℹ️

We haven’t written this article yet. Please contact us if you are interested in learning about this topic.

Integration with Hosted Email Relaying Services

ℹ️

We haven’t written this article yet. Please contact us if you are interested in learning about this topic.

💠

image

Footer Social Icons

©Copyright Octeth, Inc. All rights reserved.