procmail filter for mailinglist
Siggy Brentrup
ubuntu at psycho.i21k.de
Wed Jul 15 21:06:15 UTC 2009
On Wed, Jul 15, 2009 at 15:39 -0300, Derek Broughton wrote:
> Jay Daniels wrote:
>
> > On Tue, 2009-07-14 at 08:24 +0200, Siggy Brentrup wrote:
> >> On Tue, Jul 14, 2009 at 01:42 -0400, Jay Daniels wrote:
>
> >> > :0 # Majordomo lists
> >> > * ^Sender: owner-\/[-a-zA-Z0-9_.]*
> >> > list.$MATCH/
>
> >> * ^Sender: ubuntu-security-announce-bounces at lists\.ubuntu\.com$
> >> ubuntu/security-announce/
> >> :0E
> >> * ^Sender: ubuntu-de-bounces at lists.ubuntu.com$
> >> ubuntu/de/
> >> :0E
> >> * ^Sender: ubuntu-motu-bounces at lists.ubuntu.com$
> >> ubuntu/motu/
> >> :0E
> >
> > There's got to be an easier way to use procmail with a variable with
> > list from mailman like the Majordomo filter above.
But it's unsafe like your majordomo example, see below.
> 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 :)
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.
> (and I don't even know procmail).
Syntax is obvious from the examples. :P
> 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. My postfix MTA is set up to use
procmail as MDA, fetchmail injects mail into the incoming MTAs queue,
since the final Mail (and NFS) server doesn't run 24/7 to save energy.
--
Please don't cc: me when replying on the list.
bsb-at-psycho-dot-informationsanarchistik-dot-de
or: bsb-at-psycho-dot-i21k-dot-de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090715/81312966/attachment.sig>
More information about the ubuntu-users
mailing list