Re: bounce handler issue

 
From: "Justin J" <justin@PROTECTED>
Date: April 3rd 2012

Re: Exim bounces (or any bounces, really) -

Here's how to make the bounce handler work better:

The bounce handler works by parsing and filtering bounced messages - the more bounce messages I have to work with, the better the bounces can get Right now for Exim, there's only one? in the corpus:

https://github
com/justingit/dada-mail/blob/master/dada/t/corpus/email_messages/bounce-exim-something
eml

Sadly, it doesn't look like Exim follows any sort of agreed-upon format for bounced messages - or even non-agreed-upon formats - like Qmail, but at least Qmail writes down what their own format is:

http://cr
yp
to/proto/qsbmf
txt

Exim is pretty similar, but breaks Qmail's own rules

Anyways, here's a snippet of the bounce, that gives most all the relative bits we get to work with:

subscriber@example com SMTP error from remote mail server after end of data: host mta6 am0 yahoodns net [74 6 136 65]: 554 delivery error: dd Sorry your message to subscriber@example com cannot be delivered This account has been disabled or discontinued [#102] - mta1029 mail sk1 yahoo com

So, we get the email address that bounces (subscriber@example com) and then, what that other server, in this case Yahoo's server, says, "Sorry your message to subscriber@example com cannot be delivered This account has been disabled or discontinued" - and really that's all we get to work with

If the bounce handler gets a message like this, it'll hit the, "exim_user_unknown" rule and that email address will get a hardbounce score So that's good!

The parser currently doesn't work for every single bounce from Exim - if you look at the code:

https://github
com/justingit/dada-mail/blob/master/dada/DADA/App/BounceHandler/MessageParser
pm#L870

The regexes used for matching are really simple:

m/This user doesn\'t have a (
*?) account/

m/This account has been disabled or discontinued|or discontinued \[\#102\]/

So our example hits that second regex, but as you can see, there's a ton more things we could look for Matching either of these two regexes simply changes the, "Status" to, "5 x y" - since that's what the current rule for Exim looks for:

https://github
com/justingit/dada-mail/blob/master/dada/DADA/App/BounceHandler/Rules
pm#L758

Which is also pretty simple stuff

Some of the bounces Mary is getting are a little different - but to make the bounce handler work better, you'll need the actual bounce to save, and run through the bounce handler and see if you're getting what you expect back from the bounce handler If not - some tweaks to the bounce parser need to be made, or a new rules has to be whipped up

The newest version of the bounce handler makes this easy to do - you can have bounced messages forwarded to the list owner, once it's been passed through the bounce handler Check the option:

[x] Forward bounces to the List Owner After Processing

in the bounce handler's control panel

I do that for the Dada Mail Announce List and just filter the messages to a folder, so not to gunk anything else up So, if you see a strange bounce score for a particular address, you can search for that address in your forwarded bounces and see what the actual bounced message says

If the message looks strange, paste the entire unchanged source to the issues tracker:

http://github
com/justingit/dada-mail/issues

And I'll take a look There's tons of work that can be done to make the bounce handler better, but really - more data is needed :)

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This is the developer discussion mailing list for Dada Mail.

If you are just looking for support Dada Mail, consult the message boards at:

https://forum.dadamailproject.com

Documentation for Dada Mail:

https://dadamailproject.com/d

Specifically, see the Error FAQ:

https://dadamailproject.com/d/FAQ-errors.pod.html

To post to this list, send a message to:

mailto:dadadev@dadamailproject.com

All subscribers of this list may post to the list itself.

Topics that are welcome:

  • Constructive critiques on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

Dada Mail is on Github:

https://github.com/justingit/dada-mail/

If you would like to fork, branch, send over PRs, open up issues, etc.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.