procmail
[Top] [All Lists]

Re: procmail - a condition to check deliverable and LOOPING

2005-01-11 08:18:03
On Tue, Jan 11, 2005 at 12:49:16PM +0000, Andy Heath wrote:
1. How can I have a condition that runs a program and
is true if the return code is 0 and false otherwise
(as in the attempt with sendmail -bv here).

See "man procmailrc" and especially the "w" and "W" flags.

Then see the "e" flag, which you could use to test sendmail's
success.  You'd need a w or W on the preceeding recipe.

  :0
  * some conditions
  {

     :0 w
     | sendmail args

     MYEXIT = $?

     :0 e
     * ! MYEXIT ?? ^^75^^
     some_action_because_sendmail_had_a_problem
  }
  

Untested.

-- 
dman

____________________________________________________________
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