Shawn Boone asked,
| I would like to know how I can have it log everything to the first LOGFILE
| but when it hits a RC file to set it up so I can have it log to a new
| LOGFILE just for that mail that matches the RC file. after the mail has
| hit the RC file and loged it to the new LOGFILE, get it to start logging
| everything in the global logfile again.
At the top of each included rcfile,
oldlogfile=$LOGFILE # store name of main logfile in another variable
Then recipes and assignemnts go after that, and the included rcfiles all end
LOGFILE=$oldlogfile # go back to previous logfile as well as previous rcfile
so that when procmail returns to the main rcfile, you'll get the main logfile
Note that this also works when you nest included rcfiles, because whichever
logfile was used by the rcfile you came from will be used when you return
to it. That's another reason for saving the previous logfile's name in a
variable instead of hard-coding the name of the global logfile.