freebsd-ports/mail/qmail/files/extra-patch-spamcontrol-qmail-remote.c
Renato Botelho 8d9c1f0443 When server announce auth as "PLAIN LOGIN" instead of the common inverse order
"LOGIN PLAIN" make sure qmail-remote can authenticate.
2010-09-20 13:35:44 +00:00

13 lines
706 B
C

--- qmail-remote.c.orig 2010-09-20 10:31:12.000000000 -0300
+++ qmail-remote.c 2010-09-20 10:32:12.000000000 -0300
@@ -507,6 +507,10 @@
j = str_chr(smtptext.s+i+8,'L'); /* AUTH LOGIN */
if (j > 0)
if (case_starts(smtptext.s+i+8+j,"LOGIN")) { mailfrom_login(); flagauth = 1; return; }
+ /* Deal with EHLO messages like "PLAIN LOGIN" in this order */
+ j = str_chr(smtptext.s+i+14,'L'); /* AUTH LOGIN */
+ if (j > 0)
+ if (case_starts(smtptext.s+i+14+j,"LOGIN")) { mailfrom_login(); flagauth = 1; return; }
j = str_chr(smtptext.s+i+8,'P'); /* AUTH PLAIN */
if (j > 0)
if (case_starts(smtptext.s+i+8+j,"PLAIN")) { mailfrom_plain(); flagauth = 2; return; }