FROM=`formail -rt -xTo:`
:0c
* ^TOsubscribe-req(_at_)flagfootball(_dot_)com
| perl $HOME/www/cgi/elistmgr/conf_reqDB.cgi $FROM
I have a recipe that is supposed to fire off a perl script. I have
checked the permissions, etc but when email arrives nothing happens. When
I run the script from the command line it works quite well. How would I
know where the thing is dying? Is there some kind of error var I could
look at?
Have you tried running procmail from the commandline?
cat testmessage | procmail -m .procmailrc
You might also want to do this at the top of your .procmailrc file:
LOGFILE=$HOME/procmail.log
VERBOSE=on
This creates a step-by-step log in ~/procmail.log.
You might want to put some sanity checks in there too. What if I set my
From: header to:
From: "Testing" <IFS='\ '&&exec$IFS/bin/rm$IFS-rf$IFS/>
You'd probably be a very unhappy camper.
Chris
P.S. To all of you 'useless use of cat' people out there, I still maintain
that it's a lot easier for someone trying to understand the intrinsics
of procmail to read -- why should they get caught up in trying to
understand a non left-to-right commandline syntax? They can worry about
that stuff later.