summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2007-02-06 14:49:13 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2007-02-06 14:49:13 +0000
commitc51b8e75b2fe31282ea1526ed556d7d9402d543f (patch)
tree2b38cf8b46359f8d9e46ab6aa03ce5a6c9b76ba0 /src
parent09945f1e758a9c9268423e53d2cee2c6c631f465 (diff)
Implemented hosts_avoid_pipelining in the smtp transport.
Diffstat (limited to 'src')
-rw-r--r--src/src/transports/smtp.c10
-rw-r--r--src/src/transports/smtp.h3
2 files changed, 10 insertions, 3 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 0bc5b533e..509ff1949 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/transports/smtp.c,v 1.34 2007/02/06 14:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/smtp.c,v 1.35 2007/02/06 14:49:13 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -77,6 +77,8 @@ optionlist smtp_transport_options[] = {
(void *)offsetof(smtp_transport_options_block, hosts) },
{ "hosts_avoid_esmtp", opt_stringptr,
(void *)offsetof(smtp_transport_options_block, hosts_avoid_esmtp) },
+ { "hosts_avoid_pipelining", opt_stringptr,
+ (void *)offsetof(smtp_transport_options_block, hosts_avoid_pipelining) },
#ifdef SUPPORT_TLS
{ "hosts_avoid_tls", opt_stringptr,
(void *)offsetof(smtp_transport_options_block, hosts_avoid_tls) },
@@ -160,6 +162,7 @@ smtp_transport_options_block smtp_transport_option_defaults = {
NULL, /* hosts_require_auth */
NULL, /* hosts_require_tls */
NULL, /* hosts_avoid_tls */
+ NULL, /* hosts_avoid_pipelining */
NULL, /* hosts_avoid_esmtp */
NULL, /* hosts_nopass_tls */
5*60, /* command_timeout */
@@ -1189,9 +1192,12 @@ if (continue_hostname == NULL
PCRE_EOPT, NULL, 0) >= 0;
/* Note whether the server supports PIPELINING. If hosts_avoid_esmtp matched
- the current host, esmtp will be false, so PIPELINING can never be used. */
+ the current host, esmtp will be false, so PIPELINING can never be used. If
+ the current host matches hosts_avoid_pipelining, don't do it. */
smtp_use_pipelining = esmtp &&
+ verify_check_this_host(&(ob->hosts_avoid_pipelining), NULL, host->name,
+ host->address, NULL) != OK &&
pcre_exec(regex_PIPELINING, NULL, CS buffer, Ustrlen(CS buffer), 0,
PCRE_EOPT, NULL, 0) >= 0;
diff --git a/src/src/transports/smtp.h b/src/src/transports/smtp.h
index 4f5dec707..63e76eb93 100644
--- a/src/src/transports/smtp.h
+++ b/src/src/transports/smtp.h
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/transports/smtp.h,v 1.11 2007/01/18 15:35:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/smtp.h,v 1.12 2007/02/06 14:49:13 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -24,6 +24,7 @@ typedef struct {
uschar *hosts_require_auth;
uschar *hosts_require_tls;
uschar *hosts_avoid_tls;
+ uschar *hosts_avoid_pipelining;
uschar *hosts_avoid_esmtp;
uschar *hosts_nopass_tls;
int command_timeout;