Re: How to organize mail in folders?
On Wed, Aug 15, 2007 at 10:39:09AM +0200, M. Fioretti wrote:
> On Tue, Jul 31, 2007 12:25:04 PM +0200, Louis-David Mitterrand
> (vindex+lists-mutt-users@xxxxxxxxxxx) wrote:
>
> > Here is a mail strategy I refined over 10 years and that serves me well:
> >
> > - mail BCC'd to me is procmail'd in a ~/Maildir/.BCC folder, as are
> > replies to my mailing list posts
> ...
> > (procmail recipes available on request)
>
> Louis,
>
> yes, I'm really interested in your all procmail recipes, especially
> the one above (I'm trying to do the same thing myself). Configuration
> files for mutt and server side anti-spam are also welcome, if you can
> share them.
Hi,
Here are a few sections of my ~/.procmailrc:
## LDM's procmail file
MAILDIR=$HOME/Maildir
VERBOSE=on
LOGABSTRACT=yes
## pseudo variable $1 can't be used on condition line: copy the value
to ARG
EXTENSION=$1
ALTERNATES=(all\.my\.mail@addresses|separated@by\.pipes)
## all mailing list mail comes in as vindex+lists-<listname>@apartia.org
## EXTENSION thus contains the list name
:0
* EXTENSION ?? ^lists-\/.*
{
FOLDER=$MATCH
:0
*$! ^From:.*$ALTERNATES
*$! ^TO_$ALTERNATES
* ! ^References:.*\<(some|of|my|domains)\>
* ! ^From:.*@(other|patterns|to|watch|for)\
* ! HB ?? (Louis-David|Mitt?err?and) ## skip if message has my
name
{
# eliminate duplicate list messages
:0 Wh: $HOMEMAIL/.msgid.lock
| formail -D 32768 $HOMEMAIL/.msgid.cache
:0
.$FOLDER/
}
:0E ## else file in .BCC
* ! ^From: mailman-owner@
.BCC/
:0E ## if from mailman-owner
.junk-admin/
}
## file in .CC
:0
*$! ()\/^To:.*$ALTERNATES
*$ ()\/^Cc:.*$ALTERNATES
.CC/
## not in To: header, low-priority stuff
:0
*$ ()\/^To:.*$ALTERNATES ## not to me
*$! ()\/^From:.*$ALTERNATES ## from me
*$ ()\/^X-Original-To:.*$ALTERNATES ## bounced to me
{ }
:0E ## trick to OR inverted above conditions
.BCC/
## beep, it goes into INBOX
BEEP=`/usr/bin/beep -f 2000`