dovecot-2.2: lmtp proxying: Don't auto-set mail_max_lock_timeout...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 4 17:14:07 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/c6ae1551ab40
changeset: 15024:c6ae1551ab40
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 04 17:13:47 2012 +0300
description:
lmtp proxying: Don't auto-set mail_max_lock_timeout higher than it was.

diffstat:

 src/lmtp/commands.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r a76f010eef4b -r c6ae1551ab40 src/lmtp/commands.c
--- a/src/lmtp/commands.c	Tue Sep 04 17:12:21 2012 +0300
+++ b/src/lmtp/commands.c	Tue Sep 04 17:13:47 2012 +0300
@@ -574,6 +574,7 @@
 	struct mail_deliver_context dctx;
 	struct mail_storage *storage;
 	const struct mail_storage_service_input *input;
+	const struct mail_storage_settings *mail_set;
 	struct mail_namespace *ns;
 	struct setting_parser_context *set_parser;
 	void **sets;
@@ -584,8 +585,11 @@
 	input = mail_storage_service_user_get_input(rcpt->service_user);
 	username = t_strdup(input->username);
 
+	mail_set = mail_storage_service_user_get_mail_set(rcpt->service_user);
 	set_parser = mail_storage_service_user_get_settings_parser(rcpt->service_user);
-	if (client->proxy_timeout_secs > 0) {
+	if (client->proxy_timeout_secs > 0 &&
+	    (mail_set->mail_max_lock_timeout == 0 ||
+	     mail_set->mail_max_lock_timeout > client->proxy_timeout_secs)) {
 		/* set lock timeout waits to be less than when proxy has
 		   advertised that it's going to timeout the connection.
 		   this avoids duplicate deliveries in case the delivery


More information about the dovecot-cvs mailing list