[Dovecot] [PATCH] Re: deliver: handling of quota_full_tempfail and -e

Ulrich Zehl ulrich at topfen.net
Fri May 2 14:35:13 EEST 2008


On Wed, Apr 30, 2008 at 05:53:37PM +0200, Johannes Berg wrote:
> 
> > The lines in question (in src/deliver/deliver.c) read:
> > | 1003  if (error != MAIL_ERROR_NOSPACE ||
> > | 1004      getenv("QUOTA_FULL_TEMPFAIL") != NULL) {
> [...]
> 
> Hence, what happens is that any error other than "out of space" gives
> TEMPFAIL and when quota-full-tempfail is set "out of space" also gives
> tempfail.

You're right, of course; thanks for clearing it up. I missed that the other
day: While the code is always executed if quota_full_tempfail is set, this
doesn't matter if there was any other error than "out of space", as a
TEMPFAIL is intended in this case anyway.

Now that the intial confusion is cleared up, I'd like to propose the
following patch which changes deliver's -e flag behavior to also include
the error message when TEMPFAILing.
This is useful in setups like mine where deliver is called from some MTA
(e.g., Postix) that includes the command response in bounces generated for
mails that have been in the queue for too long. Without the patch, the
sender will not get a meaningful error message back other than "temporary
error".

Ulrich
-------------- next part --------------
--- deliver.c.orig	2008-05-02 13:30:37.000000000 +0200
+++ deliver.c	2008-05-02 12:35:36.000000000 +0200
@@ -1005,6 +1005,10 @@
 			/* Saving to INBOX should always work unless
 			   we're over quota. If it didn't, it's probably a
 			   configuration problem. */
+
+			if (stderr_rejection)
+				fprintf(stderr, "%s\n", error_string);
+
 			return EX_TEMPFAIL;
 		}
 


More information about the dovecot mailing list