[Mailman-Users] filtering by subject or other headers?

Erez Zadok ezk at cs.sunysb.edu
Sat Oct 4 19:30:03 CEST 2003

In message <20031004105605.B2660 at www.ewilts.org>, Ed Wilts writes:
> I don't see anything that would stop you from processing the incoming
> e-mails through procmail before they get to mailman.  Just change the
> alias to point to valid user, process the e-mail via procmail and do
> whatever you want with it, then bounce the result over to the actual
> list processor if it passes your tests.  You could do your virus
> scanning the same way (although I would think that a callout from the
> MTA might be better).
> I don't believe that what you're asking for should be a mailman
> function.  Mailman should primarily be used to quickly get messages into
> and out the lists - all per-message processing should be handled by
> outside apps.

Thanks Ed.  It still doesn't answer my question of whether it is possible
for mailman to filter based on regexp matches on any header.

Yes, of course I could filter my list's mail before it goes to mailman.
First, this requires me to mix its support with other tools such as
procmail.  It might also make things tricker: how do I prevent direct access
to the list's address if someone finds it?  (security by obscurity doesn't
work in the long run.)  And I'll have to ensure that when the mail reaches
the list, the headers haven't been munged so much so as to make it difficult
to figure out who send that mail and from where.

I disagree with you, however, that it is not the place of Mailman to do such
filtering.  If that would have been the design philosophy for Mailman, then
it shouldn't have any filtering based on sender addresses and such.  As it
stands, Mailman has gotten to do more and more filtering to address spam and
such.  I'd like to see that trend continued.

What I'm asking for is not unreasonable.  I'm not asking for Mailman to
natively support things like SpamAssassin and MIME-Defang, but I do want it
to have a simple way of matching regexp's against any header.  Then I have a
more powerful and extensible mechanism for filtering based on any header,
and at that point it'd be easier for me to filter flexibly.  Imagine that I
feed all mailman list messages first via spamassassin's "spamc" tool, just
to get it to add the X-Spam-Level header.  I'd love to write a Mailman rule
that will ignore all mail if x-spam-level matches '******' or such.


More information about the Mailman-Users mailing list