[Dovecot] PATCH: sendmail-like DSNs in Dovecot deliver (EX_TEMPFAIL always)

Timo Sirainen tss at iki.fi
Sun May 13 18:16:22 EEST 2007

On Wed, 2007-05-09 at 15:31 +0200, Steffen Kaiser wrote:
> The hooks are so that:
> a) config file setting:
> lda_mode = mode
> b) command line:
> deliver --mode mode
> where mode is default or sendmail.
> When no mode is specified, it defaults to "default", which is the current 
> behaviour.

Since I can't think of any other modes, how about just a simple -e
parameter which means that rejections are done by writing the error to
stderr and exiting with EX_NOPERM.

> In sendmail mode, mail_send_rejection() simply prints the rejection reason 
> to stdout, logs it and returns EX_TEMPFAIL.

Shouldn't it be stderr, not stdout? Although I guess both might work.

> Ideally, the return value would be specific to the reason. I haven't poked 
> into this deeply, but it doesn't look straight forward.

I don't think there are any useful exit codes in sysexits.h. Hmm.
Deliver fallbacks always trying to write mail to INBOX if it couldn't
write it elsewhere. So INBOX writes can fail only with:

1. permission problems
2. out of quota

In INBOX cause 1. is probably a configuration problem. In this case it
should be treated as temporary problem.

2. should probably be configurable, as some people want it to be a
temporary failure and others want it to be a permanent failure.

I guess I'll have to go and fix Dovecot's error handling a bit.

For now I added the -e parameter. Currently it only works if the
delivery actually fails. I'm not sure how I should handle rejections in
Sieve scripts. http://dovecot.org/list/dovecot-cvs/2007-May/008761.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070513/5bbf96a0/attachment.pgp 

More information about the dovecot mailing list