Say that this is my .procmailrc file:
* ^FROM .*(other-user|more-users)@
* ^To: (_dot_)*Me(_at_)ISP(_dot_)com
|gzip >> /user/username/users.gz
* ^From: .*(joe|mary|paul)@
* ^To: (_dot_)*Me(_at_)isp(_dot_)com
!other-account(_at_)IPS(_dot_)COM #forward to another account.
|gzip >> /user/username/other.file.gz
$LOGFILE #This is when I do not understand, should this be before the
last brack or after.
Let me see if I even understand, If the $LOGFILE is placed before the last
brack then only the mail that matched the above will change the logfile
back to the first. but if it does not match then it will (I think) never
get to the bracks and bypass the $LOGFILE and continue with the new
LOGFILE I have given.
is this right....
Anyone got anymore on this?
On Fri, 3 Apr 1998, David W. Tamkin wrote:
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.
'reality.sys corrupt! reboot universe? (y,n,q):