Currently Bounce Mails are fetched from the smtp store, and a list of regexes are applied to the mail to try and categorize the bounce. There are 10 categories, and an eleventh for when a mail couldn't be matched (syntax bounce).

What I am missing are the defined SMTP status codes. Here is a list with an official list of codes from the RFC, as well as some lists I found convenient for translating the basic status code to the enhanced one:

In a test environment with 4000 bounce mails, 1290 couldn't be classified (syntax bounce), but out of those ~850 mails have some form of SMTP status code.

Did anyone ran into some of those problems as well? And wouldn't it make sense to implement those codes as regexp and push them to core?

If no one has done it yet, I would offer to implement the regex, but I don't want to re-implement something. I'm curious why/if nobody ran into the same problem!

1 Answer 1


This has been implemented in this extension. Currently a bit static, but patterns for smtp (enhanced and simple) as well as some german away patterns can be easily added.

Extension is alpha at the moment, so handle with care. Pattern files are JSON, and can be edited as well. The Extension does a bit more as well, check Readme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.