OpenSource For You

Why We Need to Handle Bounced Emails

Bounced emails are the bane of marketing campaigns and mailing lists. In this article, the author explains the nature of bounce messages and describes how to handle them.

-

Wikipedia defines a bounce email as a system-generated failed delivery status notificati­on (DSN) or a non-delivery report (NDR), which informs the original sender about a delivery problem. When that happens, the original email is said to have bounced. Broadly, bounces are categorise­d into two types: A hard/permanent bounce: This indicates that there exists a permanent reason for the email not to get delivered. These are valid bounces, and can be due to the non-existence of the email address, an invalid domain name (DNS lookup failure), or the email provider blacklisti­ng the sender/recipient email address. A soft/temporary bounce: This can occur due to various reasons at the sender or recipient level. It can evolve due to a network failure, the recipient mailbox being full (quota-exceeded), the recipient having turned on a ‘vacation reply’, the local Message Transfer Agent (MTA) not responding or being badly configured, and a whole lot of other reasons. Such bounces cannot be used to determine the status of a failing recipient, and therefore need to be sorted out effectivel­y from our bounce processing. To understand this better, consider a sender alice@ example. com, sending an email to bob@ somewhere. com. She mistyped the recipient’s address as bub@ somewhere. com. The email message will have a default envelope sender, set by the local MTA running there ( mta. example. com), or by the PHP script to alice@ example. com. Now, mta. example. com looks up the DNS mx records for somewhere. com, chooses a host from that list, gets its IP address and tries to connect to the MTA running on somewhere. com, port 25 via an SMTP connection. Now, the MTA of somewhere. com is in trouble as it can't find a user receiver in its local user table. The mta. somewhere. com responds to example. com with an SMTP failure code, stating that the user lookup failed ( Code: 550). It’s time for mta. example. com to generate a bounce email to the address of the return- path email header ( the envelope sender), with a message that the email to alice@ somewhere. com failed. That's a bounce email. Properly maintained mailing lists will have every email passing through them branded with the generic email ID, say mails@ somewhere. com as the envelope sender, and bounces to that will be wasted if left unhandled.

 ??  ??
 ??  ??

Newspapers in English

Newspapers from India