procmail
[Top] [All Lists]

Re: Sort into mailing list folders ...

1998-09-25 11:34:25
At 12:31 25-09-98 -0500, Gunther Schadow wrote:

The problem is, some of the lists I subscribed to are closely related.
Because of this, pople often crosspost to many of them.  There might

Hint: don't rely on the from/to/cc addressing.  Check your messages for
things like:

Resent-Sender:
Resent-From:
Return-Path:

(there are others, but I'm not endeavoring to be complete here)

Often, these headers will identify the list which you recieved this
particular message from.  Some cheezy listserv-wannabe programs don't
inject Resent-From or Return-Path, but usually as a function of the mailer,
Return-Path is correct.


For example, I filter procmail like so:

# Procmail discussion list
:0
* ^Resent-Sender: procmail-request(_at_)informatik\(_dot_)rwth-aachen\(_dot_)de
{
        :0c:
        | $FORMAIL -A"X-PSE-MB: PROCMAIL" >> $DEFAULT

        :0:
        |gzip -9fc>>$MAILDIR/procmail.gz
}

# Then ditch carbons and the like.
:0:
* ^TOprocmail
|gzip -9fc>>$MAILDIR/cc_list.gz


(note that I use a POP mail client, so the additional header is something I
use so the pop client can easily filter the message without duplication of
effort, the gzipped folder copy is for posterity, and the last rule there
prevents messages that are TO procmail, but weren't caught by the previous
rule (meaning they weren't FROM procmail), from appearing in my mailbox --
not a rule you apparently would want to use, but one that works well for me).

Using four rules of the form above (minus the ditch-cc rule), you'd get the
action you're looking for, I believe.

---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395

<Prev in Thread] Current Thread [Next in Thread>