Dan Mahoney via Postfix-users:
> Hey there folks,
> 
> At dayjob we have a few aliases which feed into our rt system via
> a pipe.  Is there a way to have those queued locally and retried
> in the event of a failure?  Right now, if rt is down, that pipe
> returns a 500 series message immediately.

The pipe daemon runs the configured command, and depending on the
command output or exit status,

If the command was killed by signal: defer and retry later.

If the command output starts with 4.x.x status code: defer and retry later.

If the command output starts with 5.x.x status code: bounce the message.

If the command output does not start with x.x.x stauts code: look
at the command exit status code.

- Exit status code 0 (success): detete the queue file.

- Map a non-zero exit status code to an x.x.x status code using this
  table:

    EX_USAGE, "5.3.0", "command line usage error",
    EX_DATAERR, "5.6.0", "data format error",
    EX_NOINPUT, "5.3.0", "cannot open input",
    EX_NOUSER, "5.1.1", "user unknown",
    EX_NOHOST, "5.1.2", "host name unknown",
    EX_UNAVAILABLE, "5.3.0", "service unavailable",
    EX_SOFTWARE, "5.3.0", "internal software error",
    EX_OSERR, "4.3.0", "system resource problem",
    EX_OSFILE, "5.3.0", "critical OS file missing",
    EX_CANTCREAT, "5.2.0", "can't create user output file",
    EX_IOERR, "5.3.0", "input/output error",
    EX_TEMPFAIL, "4.3.0", "temporary failure",
    EX_PROTOCOL, "5.5.0", "remote error in protocol",
    EX_NOPERM, "5.7.0", "permission denied",
    EX_CONFIG, "5.3.5", "local configuration error",

Where the EX_XXX numeric codes are defined in 
/usr/include/sysexits.h.

        Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to