[Mailman-Users] Regexp for blocking addresses

Mark Sapiro mark at msapiro.net
Tue Sep 29 04:41:51 CEST 2015


On 09/28/2015 07:46 AM, Matthew Saltzman wrote:
> 
> So I used the ban script from 
> http://nigelb.me/2015-08-26-mailman-attacks.html to add regexps of the
> form
> 
>     "^\.*j\.*o\.*e\.*b\.*l\.*o\.*w    \    .*+.*@gmail    \.com"
> 
> to the ban list. They show up in the ban_list window looking correct 
> (without the quotes) but don't seem to be blocking the intended 
> addresses. The same pattern without the \.*'s does block the addresses 
> not containing embedded periods.
> 
> Not quite sure what I'm missing or where to go here. I'd prefer not to 
> actually hack the code in MailList.py if I can avoid it.


I'm not sure either because I don't know if any of that white space is
actually there or not.

However, this part '.*+' is absolutely wrong. The + needs a preceding \
or the entire RE is invalid.

And you don't want to hack the code either because trying to keep a list
of actual addresses is futile because there keep being more, the
permutations with '.' notwithstanding. You want either the regexp I'm
using or one of the 'safer' ones in my reply at
<https://mail.python.org/pipermail/mailman-users/2015-September/079874.html>.

-- 
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