procmail
[Top] [All Lists]

Re: Executing external cmds via procmail

2003-05-06 08:19:05

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.

That first nested recipe is a delivery recipe.  Once the message is
delivered, no subsequent recipes will be matched, because procmail
thinks it's done for this message.  If you want it to continue, you need
to add the "c" flag to tell it to "continue".  And if filename.txt isn't
unique per message, you probably want to lock it, so:

:0: /path/to/file.lock
#whatever
{
  :0 bwc
  /path/to/file

  :0
  /path/to/program /path/to/file
}

For more information, read the first six paragraphs of the procmailrc(5)
man page.

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Abuse / Whatever
  it.canada, hosting and development                   http://www.it.ca/


_______________________________________________
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>