summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2012-06-04 14:54:13 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2012-06-04 14:57:04 +0100
commit9940096804c9f3985ca3bc9d862cefa0daa29c96 (patch)
tree1550f5e72b19015f4be26ff00c3d6f1419a1bd18 /src
parent389ca47a59cc0247fcee8a50da42aa00af5f7a90 (diff)
Add hosts_verify_avoid_tls option to smtp transport.
Diffstat (limited to 'src')
-rw-r--r--src/src/transports/smtp.c5
-rw-r--r--src/src/transports/smtp.h1
-rw-r--r--src/src/verify.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index a63f48fac..94b848540 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -106,6 +106,10 @@ optionlist smtp_transport_options[] = {
#endif
{ "hosts_try_auth", opt_stringptr,
(void *)offsetof(smtp_transport_options_block, hosts_try_auth) },
+#ifdef SUPPORT_TLS
+ { "hosts_verify_avoid_tls", opt_stringptr,
+ (void *)offsetof(smtp_transport_options_block, hosts_verify_avoid_tls) },
+#endif
{ "interface", opt_stringptr,
(void *)offsetof(smtp_transport_options_block, interface) },
{ "keepalive", opt_bool,
@@ -170,6 +174,7 @@ smtp_transport_options_block smtp_transport_option_defaults = {
NULL, /* hosts_require_auth */
NULL, /* hosts_require_tls */
NULL, /* hosts_avoid_tls */
+ US"*", /* hosts_verify_avoid_tls */
NULL, /* hosts_avoid_pipelining */
NULL, /* hosts_avoid_esmtp */
NULL, /* hosts_nopass_tls */
diff --git a/src/src/transports/smtp.h b/src/src/transports/smtp.h
index 067681118..79f1b8c50 100644
--- a/src/src/transports/smtp.h
+++ b/src/src/transports/smtp.h
@@ -23,6 +23,7 @@ typedef struct {
uschar *hosts_require_auth;
uschar *hosts_require_tls;
uschar *hosts_avoid_tls;
+ uschar *hosts_verify_avoid_tls;
uschar *hosts_avoid_pipelining;
uschar *hosts_avoid_esmtp;
uschar *hosts_nopass_tls;
diff --git a/src/src/verify.c b/src/src/verify.c
index 6e3e6a3af..eaab14dc9 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -601,7 +601,10 @@ else
#ifdef SUPPORT_TLS
if (tls_offered &&
verify_check_this_host(&(ob->hosts_avoid_tls), NULL, host->name,
- host->address, NULL) != OK)
+ host->address, NULL) != OK &&
+ verify_check_this_host(&(ob->hosts_verify_avoid_tls), NULL, host->name,
+ host->address, NULL) != OK
+ )
{
uschar buffer2[4096];
if ( !smtps