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

Re: Filtering mail w/ procmail



On Mon, May 07, 2001 at 06:55:52AM -0600, Cameron Matheson wrote:
> I have a little problem.  I'm subscribed to three mailing lists (debian-user,
> agenda-user, and sdl), and the mail is a little overwhelming.
> It looks like the best way to filter would be to use procmail, so I set up my
> .procmailrc like so:
> 
> <procmailrc>
> #debian-user mailing list
> :0:
> * ^X-Mailing-List: <debian-user@lists.debian.org>
> Mail/debian-user

Here is what I just created and it seems to work.
------------------ snip ----------------------------------------
# .procmailrc
# routes incoming mail to appropriate mailboxes
# see man procmailrc and man procmailex
PATH=/usr/bin:/usr/local/bin
MAILDIR=$HOME/mail   # all mailboxes are in mail/
LOGFILE=/dev/null
SHELL=/bin/sh

# debian-user mail
:0:             # last colon means a lock file
* ^Resent-From:.*debian-user
debian-user     # put them in this folder

# debian-security mail (includes debian-security-announce)
:0:
* ^Resent-From:.*debian-security
debian-security

# portfolio reports in monthly gziped files
# later I will figure out how to get rid of unnecessary headers except
# date
:0:
* ^Subject: Portfolio Report
| gzip >> portfolio`date +%y-%m`.gz

# abiword-user mail
:0:
* ^(To:|CC:|Sender:).*abiword-user
abiword-user
---------------- snip --------------------------------------
I hope that helps.

cheers

Mark.



Reply to: