"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
* ^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
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
Actually, if your script doesn't write to any files then no lockfile
is needed, but on the assumption that it does (what else is there for
it to do?):
# It should activate when 'mode' is in the subject. Note that comments
# among the conditions only work in procmail 3.11preX. Personally I
# find they make the whole thing look cluttered...