DevHeads.net

How to defermessages, that fails to deliver to local script?

Hi everybody!

I have installed postfix-2.5.6 system on my server and I have a question. There is one alias, that delivers messages to local bash script via pipe:

user: |/my/script.sh

And I want to have behaviour, when script fails (for some reasons) and such messages should be deferred, not bounced. How can I have such behaviour? What my script must return to postfix/local agent?

Thank you very much!

Comments

Re: How to defermessages, that fails to deliver to local script?

By Wietse Venema at 10/21/2009 - 19:30

devel anaconda:

Start the script with:

#!/bin/sh
trap 'exit 0' 0 1 2 3 15

See /usr/include/sysexits.h for other possibilities.

Wietse

Re: How to defermessages, that fails to deliver to local script?

By devel anaconda at 10/22/2009 - 01:54

21.10.09, 19:30, "Wietse Venema" < ... at porcupine dot org>:

Thank you, Wietse, very much! You are the best :)