procmail filter for mailinglist

Derek Broughton derek at pointerstop.ca
Thu Jul 16 02:26:42 UTC 2009


Siggy Brentrup wrote:

> On Wed, Jul 15, 2009 at 15:39 -0300, Derek Broughton wrote:

>> Of course.  Siggy's creating a hierarchical structure (though there's
>> probably a better way to do that, too), but it's clear from his examples
>> that you just need to extract out the part before "-bounces".  So to be
>> like your Majordomo example:
>> 
>> * ^Sender: [-a-zA-Z0-9_.]*-bounces
>> list.$MATCH/
> 
> Never put this in your .procmailrc: by crafting a Sender:
> xxxx-bounces at some.where in a malicious message anybody can create
> a maildir on your system, from now on any mail carrying this header
> will be delivered to list.xxxx/ without you even noticing :)

WTP?  I fail to see how that's an issue.  I don't use procmail, but I _do_ 
filter mail into essentially random maildirs.   If it's spam, or any other 
malicious content, it's just sitting there in a folder - it's _never_ 
unnoticed.  It will show up as New mail.
> 
> That's the rationale for me to match the full header line and thus an
> entry for every accepted sender plus a fallback for non-matches.

Yeah, reasonable, but imo unnecessary.
 
>> (and I don't even know procmail).
> 
> Syntax is obvious from the examples. :P

That's what I thought :-)
 
>> As for your other comment:
>> > I ran into a problem with this pipe to IFS line.  It seems fetchmail
>> > does not use .forward at all.
> 
>> It certainly doesn't.  Fetchmail shouldn't be doing mail delivery (I'm
>> not
>> sure it even can).  Fetchmail is intended to put mail into either your
>> local SMTP queue, or hand it off to an MDA (in your case procmail).
> 
>> procmail should handle the .forward.
> 
> Most if not all MTAs handle .forward.

Absolutely, but not fetchmail itself.
-- 
derek






More information about the ubuntu-users mailing list