[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: maildrop config



On Sunday 28 November 2004 6:45 pm, Nick Smith wrote:
> is there anyone out there using maildrop to filter mailinglist mail to 
> their own folders? would you mind posting your config here so i can 
> see  some examples? 

If you're not attached to maildrop and wouldn't mind procmail instead, 
here's the rules you need:

##############################
#  Dynamic Mail filters
#  The following set of rules use the matching ability of procmail to
#  dynamically filter mail based on parsing one of the possible
#  mailing list headers.  This means you can subscribe to new mailing
#  lists without having to add lines to your procmail filters.  Very
#  Good Thing (tm).  # When I first found this list, I think there
#  were 4 entries.  I add a new entry every time some new mailing list
#  ends up in my inbox (i.e. it is not covered by the current ruleset.)  
#  Comments appear where I can remember them.  This makes a new mailbox 
#  for every mailing list it can find in $MAILDIR/lists/

#  Used by the perl6-all list to break out into seperate mailboxes
:0:
* ^X-Mailing-List-Name: \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

#  Majordomo uses Sender header to tell when it is coming from
:0:
* ^Sender: owner-\/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^Delivered-To: mailing list \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-Mailing-List: <\/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-Loop: \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-List-ID: <\/[^@\.]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-list: \/[^@\.]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-BeenThere: \/[^@]+
lists/`echo $MATCH | sed -e 's/[\/]/_/g'`


> im a little confused as to how to filter both TO: and/or  
> CC: in the same filter.

Use mailing-list specific headers like List-Id:, X-Mailing-List:, 
Sender:, etc. instead.

-- 
Paul Johnson
baloo@ursine.dyndns.org
http://ursine.dyndns.org/

Attachment: pgpWCi4DVy6M6.pgp
Description: PGP signature


Reply to: