Question

When mailman receives a bounceback in a format that it doesn't recognize, it discards the message and sends an "Uncaught bounce notification" to the list administrator.

How would it be possible to define new templates or rules for mailman to process bounces?

For example, the message below is unrecognized by mailman, but is a common bounceback message from a particular domain that many of my list members are using. I would like to be able to have mailman process these automatically.

This message was created automatically by mail delivery software.

A message that you have sent could not be delivered to one or more
recipients.  This is a permanent error.  The following address failed:

  <user@domain.com>: 550 5.1.1 User unknown
Was it helpful?

Solution

You need to write a new bouncer class, eg. Mailman/Bouncers/MyMisbehavingSystem.py. You'll find this in your Mailman installation directory, which might be eg. /usr/lib/mailman/.

Have a look at the other files in Mailman/Bouncers/ for reference. It might be tricky, and I suggest taking a "if we are not absolutely certain, just pass" approach. And enclose your code in a try .. except.

Then, add MyMisbehavingSystem to BOUNCE_PIPELINE in Mailman/Bouncers/BouncerAPI.py.

Finally, please consider contributing the new class to Mailman sources.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top