Re: Procmailrc start
LuKreme <[email protected]>
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
"Hylton Conacher (ZR1HPC)" <[email protected]> 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 [email protected] 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.