New Bounce Processing Templates in Mailman
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. 开发者_Python百科This is a permanent error. The following address failed:
<user@domain.com>: 550 5.1.1 User unknown
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.
精彩评论