On Thu, Dec 20, 2012 at 10:58:01PM +0530, Sreenivas Reddy T wrote:

>       I have set up the postfix  server for catch-all email address.
> Whenever an email arrives, my script (Command Based Filter) will do headers
> parsing and store it in  the database, But whenever some error occurs in
> the script, Postfix sends an email with error message - meaning stack trace
> of program to the sender email. I want it to send to a particular email
> address instead of *sender *of that email. How can i achieve this?

If a message is undeliverable, it bounces to the sender. If you
don't want it to bounce to the sender, make sure to deliver it
(report success to Postfix).

Your script needs to never fail for any reason other than transient
resource issues (in that case exit with an exit code of EX_TEMPFAIL
aka 75) or because the message is permanently undeliverable in
which case exit with one of:

        #define EX_DATAERR      65      /* data format error */
        #define EX_NOUSER       67      /* addressee unknown */
        #define EX_NOHOST       68      /* host name unknown */
        #define EX_UNAVAILABLE  69      /* service unavailable */

If your script is buggy, fix it so it is bug-free. If that's too
difficult, and you want to queue messages in the hope that the bug
is fixed, catch ang log low-level errors and then exit with EX_TEMPFAIL.

-- 
        Viktor.

Reply via email to