[Mailman-Users] how to block / discard automatically a specificemail from email ID

Mark Sapiro mark at msapiro.net
Tue Aug 3 23:10:43 CEST 2010

Balaji Ramanathan wrote:
>Unfortunately, yes I am running 2.0.5 version.
>Upgrading is not under my control.
>Could you please let me know how to block/discard a specific address? and
>avoid approval notices for me?
>say - example at hotmail.com

As I said,

>> If you really mean 2.0.5, I don't think there's a way to reject/discard
>> as opposed to hold posts from a specific address.

In other words, Mailman 2.0 will hold a non-member post for approval,
but I think that's all you can do. Mailman 2.0 does not have flexible,
configurable ways to reject or discard messages based of the poster or
other message attributes.

If you can't upgrade, your only other choice, which you may not be able
to do either, is to edit the Mailman/Handlers/SpamDetect.py module in
your Mailman 2.0 installation. This module contains the definition


If you change that to

                  ('from', 'example at hotmail\.com'),

that will result in any message containing a From: header the content
of which matches the regexp 'example at hotmail\.com' being discarded.

You can add other headers and patterns to the list, but this can only
be done by editing the Mailman/Handlers/SpamDetect.py module. There is
no list configuration way to do this as there is in Mailman 2.1.x.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list