procmail
[Top] [All Lists]

Re: Executing external cmds via procmail

2003-05-06 08:47:08
On Tue, May 06, 2003 at 07:22:57AM -0700, Nick Stephens wrote:

Pretty simple, I'd think, but I'm havin a hell of a time with it, and not
finding much documentation that pertains..

:0
#doing matching here that works, dont worry bout that..
{
        :0bw
        /tmp/mirror/filename.txt

        :0
        /usr/local/bin/programname /tmp/mirror/filename.txt
}


it writes the file out perfectly, but doesn't proceed on to the next part
of the nest, running the program.  I turned on verbose logging, and it
acts like it isnt even there:

--[proclog snippet]--
procmail: [25786] Tue May  6 07:12:19 2003
procmail: Match on "stuff"
procmail: Match on "stuff"
procmail: Assigning "LASTFOLDER=/tmp/mirror/filename.txt"
procmail: Opening "/tmp/mirror/filename.txt"
procmail: Acquiring kernel-lock
procmail: Notified comsat: "root(_at_)2344277:/tmp/mirror/filename.txt"
From person(_at_)domain  Tue May  6 07:12:18 2003
 Subject: doesn't really matter
  Folder: /tmp/mirror/filename.txt                          260475
--[end proclog]--

any ideas?

Of course it acts like nothing is there: nothing is there!  You dispatched
the message into a delivering recipe up above.  Procmail exits on
successful delivery unless you do something to stop it from doing so.

You're lucky the message was delivered, because otherwise it would
(try to) write over your program with a message in the second recipe.

You need a `c' flag.  Here is one way:

        :0 bcw
        /tmp/mirror/filename.txt

        :0 hi  # we don't need the message at all, so `hi' minimizes impact
        | program argument

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>