[Mailman-Users] Block domain

Dan Jones ddjones at riddlemaster.org
Thu Dec 18 00:25:45 CET 2003


On Wed, 2003-12-17 at 18:13, Todd wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Dan Jones wrote:
> > I want to block all mail from a specific domain.  Under Privacy
> > options/sender filters, in the box marked "List of non-member addresses
> > whose postings will be automatically discarded" I put ^domain.com.  This
> > should be a simple regular expression that will always match the domain
> > name, but I still get emails that a posts from whatever at domain.com needs
> > authorization, and I have to go in and delete it.  Why doesn't this
> > work, and what does work?
> 
> That regex only matches if the address begins with domain.com.  You
> might want something more like @domain.com$ or possibly .*@domain.com$
> (I don't know if the former works in mailman's sender filters or not.
> I haven't tried it).

You're saying that because the caret is a beginning of line anchor?  The
web page says: "In the text boxes below, add one address per line; start
the line with a ^ character to designate a Python regular expression.
When entering backslashes, do so as if you were using Python raw strings
(i.e. you generally just use a single backslash)."  I took that to mean
that the caret was a flag to mailman indicating a regex, and would not
be seen by the regex engine.  I'll try a regex which assumes the caret
is passed as a normal beginning-of-line anchor.







More information about the Mailman-Users mailing list