summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2012-09-11 23:11:16 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2012-09-11 23:11:16 +0100
commitea7224901573939b2aa159db5517c4ab60e22539 (patch)
treeb752a3aef71850f8af418a0155ba1c2b916bf584 /src
parente93f9a69dd2a211be2889b0e0f01cf4d41012dc0 (diff)
Avoid using a waiting db for single-message-only transports. Performance
bug 1262 and patch from Paul Fisher. Testcase 0288 exercises.
Diffstat (limited to 'src')
-rw-r--r--src/src/transports/smtp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index f7af921af..36a053f2c 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -3114,9 +3114,12 @@ for (addr = addrlist; addr != NULL; addr = addr->next)
/* Update the database which keeps information about which messages are waiting
for which hosts to become available. For some message-specific errors, the
update_waiting flag is turned off because we don't want follow-on deliveries in
-those cases. */
+those cases. If this transport instance is explicitly limited to one message
+per connection, follow-on deliveries are not possible, and there's no need
+to create/update a waiting database. */
-if (update_waiting) transport_update_waiting(hostlist, tblock->name);
+if (update_waiting && tblock->connection_max_messages != 1)
+ transport_update_waiting(hostlist, tblock->name);
END_TRANSPORT: