On Mon, 23 Sep 1996, Philip Guenther wrote:
"Martti M. Mela" <mmela(_at_)norssi(_dot_)oulu(_dot_)fi> writes:
I wonder how to set up a .procmailrc file, that tells
to my shell script that it should run..
I tried something like
# .procmailrc
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin
LOGFILE=$MAILDIR/log
LOCKFILE=$HOME/.lockmail
:0:
* ^Subject:.*mode # It should activate, when there's that subject
| script.pl # I though that using pipe, it should work, but no..
How to continue? And when this works, this has nothing to do with other
mails, right?
I see 5.5 bugs:
1) You're using a global lockfile. Don't.
2) You failed to specify a name for the locallockfile, and the command
doesn't have a ">>" in it for procmail to figure it out itself.
3) You put a comment on the same line as a condition. You can't do that,
as it looks like a regexp containing '#'.
4) You didn't include the 'w' flag to have procmail check the return code
of the command for errors.
5) You forgot to turn on verbose logging via "VERBOSE = on"
5.5) You forgot to look in the logfile to see what procmail thinks is
happening; or if you did, you forgot to tell us what the logfile
contains.
Would this be bug #6?
Is script.pl in a place where procmail can find it?
--
"MacDonald has the gift on compressing the largest amount of words into
the smallest amount of thoughts."
-- Winston Churchill