procmail
[Top] [All Lists]

Re: Exitcode

2010-11-27 14:38:57
Emmanuel, please stop replying to the digest message.  It would be
most courteous if you could temporarily turn off digest mode and
respond to individual messages until you are done discussing your
questions; if that's not possible, you should at least change to a
more specific Subject: and edit the other digest messages out of your
reply so as to repeat as little of the conversation as is reasonable.

On Sat, Nov 27, 2010 at 3:02 AM, Emmanuel Buamah <wasanzy(_at_)yahoo(_dot_)com> 
wrote:

I want procmail to just feed the mail to the script and delete the message 
with out delivering it, so that the script will take care of deliverying. If 
for any reason, the script can not connect to the database, then procmail 
should go ahead and deliver the message.

How do I go about that? I can handle the script but how to just feed the mail 
to the script and delete it is my problem.

The presence or absence of the "f" (filter) flag determines whether an
action that begins with "|" is treated as a filter or a final
delivery.  In either case procmail assumes the program will accept the
entire message on its standard input; if you use "f" then procmail
further assumes that the standard output of the program is the
rewritten message content, and will automatically arrange to capture
that output.

The "w" or "W" flags tell procmail to treat failure of the pipe as
failure to filter or deliver, the difference being whether the error
is logged. Thus for example you want like so:

:0 W
| perl /path/to/your/program.pl

If the program exits with a nonzero status, procmail will treat the
message as not yet delivered and proceed; if the program exits zero,
procmail stop at this point.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Exitcode, Emmanuel Buamah
    • Re: Exitcode, Bart Schaefer <=