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

Jon Carnes jonc at nc.rr.com
Sun Oct 5 01:25:17 CEST 2003

On Sat, 2003-10-04 at 15:30, Erez Zadok wrote:
> In message <20031004190235.GS18903 at psilocybe.teonanacatl.org>, Todd writes:
> > Hash: SHA1
> > 
> > Erez Zadok wrote:
> > > I'd like to setup a filter rule that says: if the subject line
> > > matches a certain string, discard this email and never tell me about
> > > it.  However, I don't this kind of rule to affect the way other
> > > moderation or filter rules work.  That is, if I configure mailman to
> > > hold all messages from unknown senders, then those not matching the
> > > spam filter rule I just described, should be left in the hold queue.
> > 
> > Sounds like you're describing the bounce_matching_headers option, from
> > Privacy Options -> Spam Filters, except that you want the default
> > action to be discard instead of hold.  I don't believe this is
> > possible at the moment, but it seems like it would be a simple thing
> > to add.  You could either add another option to the Spam Filters page,
> > perhaps discard_matching_headers, or just an option that toggled
> > whether posts matching bounce_matching_headers were held or discarded.
> > 
> > That would be handy to have a on a list by list basis, but there is a
> > site-wide configuration option, KNOWN_SPAMMERS, that you can set in
> > mm_cfg.py which looks to do exactly what you want.  You might want to
> > give that a try.  One of the comments in the SpamDetect.py file where
> > this spam filtering is done says "This needs to be made more
> > configurable and robust."  So it's on the list of things that will
> > happen when someone makes time to code it in.
> > 
> > - -- 
> > Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
> Todd,
> Yes!  That's exactly it.  Right now all I can do is "hold" mails that match
> certain headers.  I like that option for certain cases, but I'd like another
> (independent) option to completely discard mails that match certain headers.
> And while we're at it, why only hold or discard?  Why not offer the same
> sets of options available in other places: hold, discard, forward to
> someone, etc.
> I don't understand something in your mail, however.  You say "you could
> either add..." and such, implying that _I_ could do it myself?  Do you mean
> that there is a facility for this already in mailman?  Or did you mean that
> I could always hack the source and add the feature I wanted?  If you meant
> the latter, then I'd prefer if someone more experienced in Python and
> Mailman's code do it (what'll take me many hours, Barry can probably do in
> his sleep, with _both_ hands tied behind his back. :-)
> Erez.
If you are simply looking at the subject line, then Procmail will do
this very easily.
  man procmailex

More information about the Mailman-Users mailing list