1
Description: Fix straight SSL/TLS connections to remote MX's.
2
Forwarded: http://gitorious.org/dma/dma/merge_requests/3
3
Author: Peter Pentchev <roam@ringlet.net>
4
Last-Update: 2011-01-25
6
--- dma-0.0.2010.06.17.orig/net.c
7
+++ dma-0.0.2010.06.17/net.c
8
@@ -346,10 +346,13 @@ deliver_to_host(struct qitem *it, struct
11
/* Check first reply from remote host */
12
- config.features |= NOSSL;
13
- READ_REMOTE_CHECK("connect", 2);
14
+ if ((config.features & SECURETRANS) == 0 ||
15
+ (config.features & STARTTLS) != 0) {
16
+ config.features |= NOSSL;
17
+ READ_REMOTE_CHECK("connect", 2);
19
- config.features &= ~NOSSL;
20
+ config.features &= ~NOSSL;
23
if ((config.features & SECURETRANS) != 0) {
24
error = smtp_init_crypto(fd, config.features);
25
@@ -357,6 +360,9 @@ deliver_to_host(struct qitem *it, struct
26
syslog(LOG_DEBUG, "SSL initialization successful");
30
+ if ((config.features & STARTTLS) == 0)
31
+ READ_REMOTE_CHECK("connect", 2);
34
/* XXX allow HELO fallback */