[Dovecot] [dovecot] notifications when delivery fails

Timo Sirainen tss at iki.fi
Fri Jun 3 15:08:28 EEST 2011


On Thu, 2011-06-02 at 10:13 +0200, Héctor Moreno Blanco wrote:
> Hello Timo,
> 
> We have dovecot 1.2.13. Is there any way to send notifications to the
> postmaster when a delivery fails?

Create a script. Instead of running deliver directly, run something
like:

#!/bin/sh

deliver $*
err=$?
if [ $err != 0 ]; then
  echo failed | mail postmaster
fi
exit $err

> For example, when the dovecot index are corrupted and the mail is not
> sent to the user (the user who sent the message receives an error
> informing that the mail has not sent).

This should never happen. The worst that can happen is that deliver
returns temporary failure and its delivery is attempted again. Although
if deliver crashes, some MTAs treat it as hard failure rather than
temporary. You could prevent that with a wrapper script too.




More information about the dovecot mailing list