[Mailman-Users] global email address blocklist?
Mark Sapiro
msapiro at value.net
Wed May 2 05:58:14 CEST 2007
Ron Brogden wrote:
>
>Looking at the source, I see the following on line 394 of "MailList.py":
>
>self.ban_list = []
>
>I am wondering if a possible solution here would be to initialize this value
>to include a list of banned email address, either via an included value from
>Defaults.py or by hardcoding the values into to the above array?
>
>self.ban_list = [ 'clueless at aol.com', 'bad_gui_design at aol.com' ]
You can do either. The 'standard' way to do it would be to define
DEFAULT_BAN_LIST = []
in Defaults.py (actually Defaults.py.in for a patch) and then put your
list
DEFAULT_BAN_LIST =['clueless at aol.com',
'bad_gui_design at aol.com']
in mm_cfg.py and put
self.ban_list = mm_cfg.DEFAULT_BAN_LIST
in MailList.py.
>What I am unclear of is whether this means that every message has to be
>scanned through this list or whether it would only apply to subscribe
>requests.
It only applies to subscription requests, and since 2.1.7, invitations,
subscription confirmations and changes of address.
However, the above changes will only initialize the ban_list for new
lists. You will still need to use config_list or whatever to update
existing lists.
>Another potential spot would be in "AddMember()". Perhaps just adding a new
>function to MailList.py which checks if the address is in a global array and
>raises an error if this is the case?
Yes. This would have the addvantage of not requiring the various list's
ban_list to be updated with every change and seems a better solution
for your purpose.
I suggest however that the place to make this change is not
AddMember(), but GetBannedPattern().
--
Mark Sapiro <msapiro at value.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