Duncan Hill <dhill(_at_)sunbeach(_dot_)net> writes:
I'm trying to get a recipe to file the body of an incoming mail in a
file, and then hand it off to a perl program for some processing. So
far I have:
:0
* ^FROM(_dot_)*dhill(_at_)pct(_dot_)edu
{
:0 bc
/home/dhill/data
:0 b
| perl /home/dhill/mailparse.pl
}
The log file contains:
From dhill(_at_)pct(_dot_)edu Wed May 5 20:39:44 1999
Folder: /home/dhill/data 32
From dhill(_at_)pct(_dot_)edu Wed May 5 20:40:53 1999
Folder: perl /home/dhill/mailparse.pl 32
I know my FROM match is probably a bit wrong, but I can't see why
procmail is not doing the perl part properly.
What is it not doing properly? Is the perl script not running?
I would suggest doing two things. Firstly, to guard against a class
of problems, add
SHELL = /bin/sh
at the top of your .procmailrc. Secondly, you should tell procmail to
check the return code of perl by adding the 'w' flag to that recipe:
:0 bw
| perl /home/dhill/mailparse.pl
procmail v3.11pre7 1997/04/28 on AIX 4.3.0
You should probably upgrade to version 3.13.1, but that shouldn't
change any of the above.
Philip Guenther