dovecot-2.2: lmtp: quota_full_tempfail=yes didn't work with lmtp...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Dec 6 12:57:39 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/81450c4bfe96
changeset: 19464:81450c4bfe96
user: Timo Sirainen <tss at iki.fi>
date: Sun Dec 06 14:57:22 2015 +0200
description:
lmtp: quota_full_tempfail=yes didn't work with lmtp_rcpt_check_quota=yes
diffstat:
src/lmtp/commands.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (43 lines):
diff -r 183576574417 -r 81450c4bfe96 src/lmtp/commands.c
--- a/src/lmtp/commands.c Sun Dec 06 14:27:46 2015 +0200
+++ b/src/lmtp/commands.c Sun Dec 06 14:57:22 2015 +0200
@@ -538,6 +538,17 @@
*address = str_c(username);
}
+static void
+client_send_line_overquota(struct client *client,
+ const struct mail_recipient *rcpt, const char *error)
+{
+ struct lda_settings *lda_set =
+ mail_storage_service_user_get_set(rcpt->service_user)[1];
+
+ client_send_line(client, "%s <%s> %s", lda_set->quota_full_tempfail ?
+ "452 4.2.2" : "552 5.2.2", rcpt->address, error);
+}
+
static int
lmtp_rcpt_to_is_over_quota(struct client *client,
const struct mail_recipient *rcpt)
@@ -564,8 +575,7 @@
if (ret < 0) {
errstr = mailbox_get_last_error(box, &error);
if (error == MAIL_ERROR_NOQUOTA) {
- client_send_line(client, "552 5.2.2 <%s> %s",
- rcpt->address, errstr);
+ client_send_line_overquota(client, rcpt, errstr);
ret = 1;
}
}
@@ -867,10 +877,7 @@
} else if (storage != NULL) {
error = mail_storage_get_last_error(storage, &mail_error);
if (mail_error == MAIL_ERROR_NOQUOTA) {
- client_send_line(client, "%s <%s> %s",
- dctx.set->quota_full_tempfail ?
- "452 4.2.2" : "552 5.2.2",
- rcpt->address, error);
+ client_send_line_overquota(client, rcpt, error);
} else {
client_send_line(client, "451 4.2.0 <%s> %s",
rcpt->address, error);
More information about the dovecot-cvs
mailing list