]> git.ipfire.org Git - people/ms/dma.git/commitdiff
Unbreak SMTP authentication.
authorPeter Pentchev <roam@ringlet.net>
Mon, 30 Mar 2009 10:59:46 +0000 (10:59 +0000)
committerPeter Pentchev <roam@ringlet.net>
Mon, 30 Mar 2009 10:59:46 +0000 (10:59 +0000)
changelog
patches/21-smtp-auth.patch [new file with mode: 0644]
patches/series

index a561f776795011f3dcf13e95d0dd3831c31582bc..c04eea7036caa122d3a9295a0fa46ffed47e324a 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,9 @@
+dma (0.0.2009.02.11-1~7) unstable; urgency=low
+
+  * Unbreak SMTP authentication - send EHLO, allow LOGIN over SSL.
+
+ -- Peter Pentchev <roam@ringlet.net>  Mon, 30 Mar 2009 13:51:28 +0300
+
 dma (0.0.2009.02.11-1~6) unstable; urgency=low
 
   * Fix my own queue display patch - if a message has multiple recipients,
diff --git a/patches/21-smtp-auth.patch b/patches/21-smtp-auth.patch
new file mode 100644 (file)
index 0000000..2b0c1bf
--- /dev/null
@@ -0,0 +1,47 @@
+Unbreak SMTP authentication with or without encrypted connections:
+- always send an EHLO command at the start of the "real" negotiation;
+- allow LOGIN authentication over an SSL link if CRAM-MD5 fails.
+
+--- a/net.c
++++ b/net.c
+@@ -213,7 +213,9 @@
+       }
+ #endif /* HAVE_CRYPTO */
+-      if ((config->features & INSECURE) != 0) {
++      if ((config->features & INSECURE) != 0 ||
++          ((config->features & SECURETRANS) != 0 &&
++           (config->features & NOSSL) == 0)) {
+               /* Send AUTH command according to RFC 2554 */
+               send_remote_command(fd, "AUTH LOGIN");
+               if (read_remote(fd, 0, NULL) != 3) {
+@@ -363,6 +365,7 @@
+                       goto out;
+       }
++#if 0
+       /*
+        * If the user doesn't want STARTTLS, but SSL encryption, we
+        * have to enable SSL first, then send EHLO
+@@ -378,8 +381,11 @@
+                       return (-1);
+               }
+       }
++#endif
+ #endif /* HAVE_CRYPTO */
++#if 0
+       if (((config->features & SECURETRANS) == 0)) {
++#endif
+               send_remote_command(fd, "EHLO %s", hostname());
+               if (read_remote(fd, 0, NULL) != 2) {
+                       syslog(LOG_ERR, "%s: remote delivery deferred: "
+@@ -388,7 +394,9 @@
+                           host, neterr);
+                       return (-1);
+               }
++#if 0
+       }
++#endif
+       /*
+        * Use SMTP authentication if the user defined an entry for the remote
index bfd67d6f5190e570715ae442468cb1f449cb6a74..b5a5c8a4dfd8e7fd6de09868b9f247cd3ac34021 100644 (file)
@@ -18,3 +18,4 @@
 18-guess-username.patch
 19-ignore-options.patch
 20-parse-recipient.patch
+21-smtp-auth.patch