dovecot-2.1: lda: If DSN is sent because user is out of quota, s...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Feb 12 07:05:19 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/ee060d756630
changeset: 14129:ee060d756630
user: Timo Sirainen <tss at iki.fi>
date: Sun Feb 12 07:05:07 2012 +0200
description:
lda: If DSN is sent because user is out of quota, send 5.2.2 as Status.
diffstat:
src/lda/main.c | 1 +
src/lib-lda/mail-deliver.h | 2 ++
src/lib-lda/mail-send.c | 2 +-
3 files changed, 4 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r 264821ba38a8 -r ee060d756630 src/lda/main.c
--- a/src/lda/main.c Sun Feb 12 07:00:12 2012 +0200
+++ b/src/lda/main.c Sun Feb 12 07:05:07 2012 +0200
@@ -453,6 +453,7 @@
configuration problem. */
return EX_TEMPFAIL;
}
+ ctx.mailbox_full = TRUE;
/* we'll have to reply with permanent failure */
mail_deliver_log(&ctx, "rejected: %s",
diff -r 264821ba38a8 -r ee060d756630 src/lib-lda/mail-deliver.h
--- a/src/lib-lda/mail-deliver.h Sun Feb 12 07:00:12 2012 +0200
+++ b/src/lib-lda/mail-deliver.h Sun Feb 12 07:05:07 2012 +0200
@@ -51,6 +51,8 @@
bool tried_default_save;
bool saved_mail;
bool save_dest_mail;
+ /* Delivery failed because user is out of quota / disk space */
+ bool mailbox_full;
};
struct mail_deliver_save_open_context {
diff -r 264821ba38a8 -r ee060d756630 src/lib-lda/mail-send.c
--- a/src/lib-lda/mail-send.c Sun Feb 12 07:00:12 2012 +0200
+++ b/src/lib-lda/mail-send.c Sun Feb 12 07:05:07 2012 +0200
@@ -133,7 +133,7 @@
fprintf(f, "Final-Recipient: rfc822; %s\r\n", recipient);
fprintf(f, "Action: failed\r\n");
- fprintf(f, "Status: 5.2.0\r\n");
+ fprintf(f, "Status: %s\r\n", ctx->mailbox_full ? "5.2.2" : "5.2.0");
fprintf(f, "\r\n");
/* original message's headers */
More information about the dovecot-cvs
mailing list