Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-26-2008, 10:09 PM   #1
LQ Newbie
Registered: May 2004
Posts: 5

Rep: Reputation: 0
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.
Old 05-27-2008, 09:24 AM   #2
LQ Newbie
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Three actions in a recipe of Procmail Borelian Linux - Software 1 11-11-2012 06:48 AM
Procmail recipe question gauge73 Linux - Software 3 05-03-2006 04:09 AM
Procmail/Formail recipe question Toadman Linux - Software 0 12-31-2005 10:41 PM
Procmail recipe jebix666 Linux - General 1 06-09-2005 01:43 PM
procmail recipe not working? theLIGHT Linux - Software 3 11-18-2002 10:04 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:14 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration