> Not sure what you mean by "use a List-* header" --  I'm trying to clean out

Several RFCs (e.g., 2369, 2919) specify mail headers beginning with
"List-".  These culminate (I guess) with inclusion in RFC 4021.
Most modern mailing list managers support one or both of List-ID or
List-Post.  You can write a single rule or two that will categorize
almost all lists appearing from a mailing list, and dispose of almost
all rules dealing with specific lists.


# Discover mailing lists with List-Post: set
:0
* List-Post: <mailto:\/.*
{
        # To set LISTNAME to whole posting address:
        #LISTNAME=`echo "$MATCH" | cut -d'>' -f1`
        # TO set LISTNAME to LHS of posting address:
        LISTNAME=`echo "$MATCH" | cut -d@ -f1`
}

## [insert other rules which update LISTNAME for edge cases]

# File discovered list mail into per-list archives
:0 c
* LISTNAME ?? .
$HOME/Mail/lists/$LISTNAME

# Add X-Label for list name
:0 f
* LISTNAME ?? .
| formail -I "X-Label: $LISTNAME"

-- 
 -D.    [EMAIL PROTECTED]    NSIT    University of Chicago

Reply via email to