~ubuntu-branches/ubuntu/oneiric/dma/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/40-smtp-banner.patch

  • Committer: Bazaar Package Importer
  • Author(s): Tarun Kumar Mall
  • Date: 2011-03-09 17:46:56 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110309174656-7s0buxoxvsos8ua1
Tags: 0.0.2010.06.17-10ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Patch 38_fix_ftbfs_binutils-gold.patch imported from previous
    ubuntu version.
  - Patch 38_fix_ftbfs_binutils-gold.patch renamed to
    42_fix_ftbfs_binutils-gold.patch
  - Patch 43_fix_ftbfs_Werror.patch added to fix 
    crypto.c:92:7: error: assignment discards 'const' qualifier 
    from pointer target type [-Werror] "Closes: #622052"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
 
 
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
 
9
        }
 
10
 
 
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);
 
18
 
 
19
-       config.features &= ~NOSSL;
 
20
+               config.features &= ~NOSSL;
 
21
+       }
 
22
 
 
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");
 
27
                else
 
28
                        goto out;
 
29
+
 
30
+               if ((config.features & STARTTLS) == 0)
 
31
+                       READ_REMOTE_CHECK("connect", 2);
 
32
        }
 
33
 
 
34
        /* XXX allow HELO fallback */