procmail
[Top] [All Lists]

Re: Procmailrc start

2011-08-26 12:22:05
"Hylton Conacher (ZR1HPC)" <hylton(_at_)conacher(_dot_)co(_dot_)za> squawked 
out on Friday 26-Aug-2011@07:21:36
I have obtained and had an introductory read of the book called Procmail
Companion (McCarthy)

Good book.

Is there a list of the lines of code that could go in the start of the file, 
if so where?

Nope, it depends largely on your system and your setup. For example, I start 
off mine with:

DATE=`date '+%d-%b-%Y'`
LONGDATE=`date "+%Y%m%d %I:%M:%S %z"`
NL="
"
WS=“  “ # space and tab
MYLOGFILE="pm-$DATE.log"
LOGFILE=$HOME/logs/$MYLOGFILE
LOGABSTRACT=NO

then I check to see it a message is from someone I have in a ‘mark as read’ 
file:

READLIST=$HOME/.readlist
READIT=`grep -i "^$CLEANFROM" $READLIST`
LOG="readlist=$READLIST CLEANFROM=$CLEANFROM READIT=$READIT$NL”

:0
* ! READIT ?? ^^^^
{ TRAP='mv "$LASTFOLDER" "${LASTFOLDER}:2,S"’ Which }

(So, for example, if root(_at_)mydomain(_dot_)tld is in .readlist’ then that 
message would be marked as read in my Maildir)

then I call a recipe file (Written by Sean) that sorts list mail

INCLUDERC = $HOME/.list_procmail

and that’s pretty much it.

YOu do need to set MAILDIR at the top of your .procmailrc if it is not properly 
set by the system. As for LOG I only log very specific information, but when 
you are still writing you will want LOGABSTRACT=YES and VERBOSE=ON. Once your 
recipes are working fine, turn those off and rely on your occasional LOG 
commands. This makes the log files a lot easier to deal with.


-- 
Don't be afraid to be weak, Don't be too proud to be strong.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>