瀏覽代碼

Fixed #1727033 (auth support detection in conf.pl)

bouchon 18 年之前
父節點
當前提交
0537faac91
共有 2 個文件被更改,包括 3 次插入4 次删除
  1. 1 0
      ChangeLog
  2. 2 4
      config/conf.pl

+ 1 - 0
ChangeLog

@@ -4,6 +4,7 @@
 
 
 Version 1.5.2 - SVN
 Version 1.5.2 - SVN
 -------------------
 -------------------
+  - Fixed #1727033 (incorrect detection of auth mechanisms in config.pl)
   - The search expression in the LDAP backend of the Addressbook is now
   - The search expression in the LDAP backend of the Addressbook is now
     configurable, which can allow the result set to be expanded.
     configurable, which can allow the result set to be expanded.
   - Preliminary support for NAMESPACE in Squirrelmail IMAP Backend: NAMESPACE
   - Preliminary support for NAMESPACE in Squirrelmail IMAP Backend: NAMESPACE

+ 2 - 4
config/conf.pl

@@ -1443,6 +1443,7 @@ sub command112b {
                 print " ERROR TESTING\n";
                 print " ERROR TESTING\n";
                 close $sock;
                 close $sock;
             } else {
             } else {
+                $got = <$sock>;  # Discard greeting
                 print $sock "HELO $domain\r\n";
                 print $sock "HELO $domain\r\n";
                 $got = <$sock>;  # Discard
                 $got = <$sock>;  # Discard
                 print $sock "MAIL FROM:<tester\@squirrelmail.org>\r\n";
                 print $sock "MAIL FROM:<tester\@squirrelmail.org>\r\n";
@@ -5048,14 +5049,11 @@ sub detect_auth_support {
 
 
     # So at this point, we have a response, and it is (hopefully) valid.
     # So at this point, we have a response, and it is (hopefully) valid.
     if ($service eq 'SMTP') {
     if ($service eq 'SMTP') {
-        if (($response =~ /^535/) or ($response =~/^502/)) {
+        if (!($response =~ /^334/)) {
             # Not supported
             # Not supported
             print $sock $logout;
             print $sock $logout;
             close $sock;
             close $sock;
             return 'NO';
             return 'NO';
-        } elsif ($response =~ /^503/) {
-            #Something went wrong
-            return undef;
         }
         }
     } elsif ($service eq 'IMAP') {
     } elsif ($service eq 'IMAP') {
         if ($response =~ /^A01/) {
         if ($response =~ /^A01/) {