-   Linux - Server (
-   -   issue with procmail recipe and external script (

nexus55 05-26-2008 10:09 PM

issue with procmail recipe and external script

I've got a problem with a procmail recipe which launches an external script:


* ^Subject: New Order Notice$
* !^X-Loop: PR$
:0 fhw
| formail -A "X-Loop: PR"

:0 c:

| /var/qmail/mailnames/ $MFILE


What I can't get working is the second rule, where all email gets delivered in ${MBASE}/Maildir/, it simply does not run. The issue is the external script that gets run (the script is run correctly, but after that the rest of the recipe is not run. It seems like procmail is hanging after that external script because the output isn't being redirected anywhere. And when I do redirect it, the script never gets run correctly.. This syntax also does not work:

"| /var/qmail/mailnames/ $MFILE" >> /dev/null

so how do I do that redirect, without messing up the $MFILE parameter which that script needs to run properly.

Thanks in advance for any tips.

nexus55 05-27-2008 09:24 AM

I think I found the working solution, but I'll need to do some more testing on it.

instead of an action line beginning with | on the line that executes the shell script, I just assign the output of it to an arbitrary variable, making that recipe non-delivering.. Then the .procmailrc file seems to continue on as it should:

RUNSHSCR=| /var/qmail/mailnames/ $MFILE

All times are GMT -5. The time now is 12:30 AM.