trigger script on postfix delivery errors

Posted by edovino on Server Fault See other posts from Server Fault or by edovino
Published on 2012-03-28T10:38:30Z Indexed on 2012/03/28 11:31 UTC
Read the original article Hit count: 220

Filed under:
|
|
|

I'm trying to get postfix to run a script on soft (4xx) and hard (5xx) delivery errors, but I'm not sure where to start.

If I understand things correctly, I could insert (pipe-based) filters in the master.cf file, there's a whole 'milter' infrastructure available, an finally I suppose I could simply grep through the mail.info logs.

So - any advice? Should I go the 'handle it via master.cf' route, and if so, what daemon should I intercept? 'bounce'? The grep-the-logs route is probably simplest, but I can't help but feel that there is a better way.

Any advice appreciated!

© Server Fault or respective owner

Related posts about email

Related posts about postfix