[Mailman-Users] Regexp for blocking addresses

Matthew Saltzman mjs at clemson.edu
Tue Sep 29 17:24:27 CEST 2015


On Mon, 2015-09-28 at 19:41 -0700, Mark Sapiro wrote:
> 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.

Not. I don't know where it's coming from, as it doesn't look like that
when I compose.

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

Ah, that's probably it. 

> 
> 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/07987
> 4.html>.
> 

Got it, thanks. I will switch to that one. Now would like to figure out
how to delete all my futile attempts from the ban list. Tried modifying
the ban script to remove instead of append, but I'm still doing
something wrong.

Anyway, thanks for your help.

-- 
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu


More information about the Mailman-Users mailing list