[TriLUG] help with procmail/postfix

Tom Woods twoods at tomnkim.us
Tue Jul 29 22:48:18 EDT 2003


Great info!  Thanks!  I've incorporated a lot of this into my own file. 
Here's hoping this message makes it into my TriLUG list folder.

Thanks to everyone who helped.

Tom

> Tom Woods wrote:
>
>> Right, NewTest was put in ~/mail...  I guess for now I'll just use the
>> full path.  If I use MAILDIR=$HOME/mail, it seems to me that it would
>> effectively move the location of my inbox out of
>> /var/spool/mail/twoods... right?
>>
>
> Actually, no.  If mail doesn't match any rules in your procmail file it
> goes to the default value which, iirc, is the value of $DEFAULT.
>
> For instance, here are some excerpts of my .procmailrc:
>
> SHELL=/bin/sh
> PATH=/bin:/usr/bin
> MAILDIR=$HOME/mail
> # Rotate procmail logs by year and month.
> LOGFILE=$HOME/logs/procmail-`date +%Y-%m`.log
> LOGABSTRACT=all
> VERBOSE=off
> SENDMAIL=/usr/sbin/sendmail
> ORGMAIL=/var/spool/mail/lovelace
> LOCKFILE=$HOME/.lockmail
> MAILINGLISTDIR=$MAILDIR/lists
>
> # Then I have a couple of recipes that I recommend to everyone.
> # One creates a backup and the other eliminates duplicate messages
>
> #################################################################
> # Create a backup cache of 100 most recent messages in case of
> # mistakes.  Backups are left in the directory $MAILDIR/backup/
> #################################################################
> :0 c
> backup
>
> :0 ic
> | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,32d`
>
> #################################################################
> # Check for duplicate messages.
> #################################################################
> :0 Wh: msgid.lock
> | formail -D 8192 $HOME/logs/msgid.cache
>
> # Later on I have some spam recipes...
>
> # Catch spam :-)
> :0:
> * ^X-Spam-Status: Yes
> spam/caughtspam
>
> :0:
> * ^X-Spam-Flag: YES
> spam/caughtspam
>
> # Here's my trilug list recipe. :-)
> # Note that the List-Id line should be all on one line.
>
> :0 :
> * ^List-Id: Triangle Linux Users Group discussion list
> <trilug.trilug.org> * ^Subject.*\[TriLUG
> $MAILINGLISTDIR/trilug
>
> # Then at the bottom of my file, I have this comment
> # to remind me what happens...
>
> #################################################################
> # send the rest through
> #################################################################
>
> # Anything that has not been delivered by now will go to $DEFAULT
> # using LOCKFILE=$DEFAULT$LOCKEXT
>
>
> So, it looks like changing the MAILDIR variable doesn't change
> your default inbox.  So, don't worry about that too much.
>
> BTW, I would highly recommend doing a "man procmailrc" and
> a "man procmailex".  There is a wealth of information in
> those two man pages (the second one being almost entirely
> examples).
>
> Cheers,
> Tanner
> --
> Tanner Lovelace | lovelace at wayfarer.org | http://wtl.wayfarer.org/
> --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*-- GPG
> Fingerprint = A66C 8660 924F 5F8C 71DA  BDD0 CE09 4F8E DE76 39D4 GPG Key
> can be found at http://wtl.wayfarer.org/lovelace.gpg.asc
> --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
>   This would be a very good time to hang out with the Open Source
>   people, before they get formally reclassified as a national security
> threat. -- Bruce Sterling
>
>
>
> --
> TriLUG mailing list        :
> http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ
> : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc






More information about the TriLUG mailing list