In my company we have a little tool written in .NET using a 3rd party component called ListNanny. It is used categorize and parse bounce back emails in the SMTPs Badmail
folder, or NDRs (Non-Deliverable Reports or Non-Deliverable Receipts).
You have to pay attention that there a serveral types of NDRs and that you have to decide in each case what to do for the particular address in your mailing list. The major distinction is "hard bounce" vs. "soft bounce". Hard bounces are permanent errors, like "Unknown user" - soft bounces occur temporarily, like "mailbox full" etc.
Here are examples of what can be parsed:
- HardBounce: The server was unable to deliver your message (ex: unknown user, mailbox not found)
- Transient: The server couldn't temporarily deliver your message
- Unsubscribe: Unsubscribe or Remove request
- Subscribe: Subscribe request from someone wanting to get added to the mailing list.
- AutoResponder: Automatic email responder ( ex: 'Out of Office' or 'On Vacation')
- AddressChange: The recipient has requested an address change.
- DnsError: A temporary DNS error.
- ChallengeVerification: The bounce is a challange asking for verification you actually sent the email. Typical challenges are made by Spam Arrest, or MailFrontier Matador
- SpamNotification: The message was delivered, but was either blocked by the user, or classified as spam, bulk mail, or had rejected content.
- OpenRelayTest: The NDR is actually a test email message to see if the mail server is an open relay.
- Unknown: Unable to classify the NDR
- SoftBounce: Unable to temporarily deliver message (i.e. mailbox full, account disabled, exceeds quota, out of disk space)
- VirusNotification: The bounce is actually a virus notification warning about a virus/code infected message.