Browse Source

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

bouchon 18 năm trước cách đây
mục cha
commit
0537faac91
2 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 1 0
      ChangeLog
  2. 2 4
      config/conf.pl

+ 1 - 0
ChangeLog

@@ -4,6 +4,7 @@
 
 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
     configurable, which can allow the result set to be expanded.
   - Preliminary support for NAMESPACE in Squirrelmail IMAP Backend: NAMESPACE

+ 2 - 4
config/conf.pl

@@ -1443,6 +1443,7 @@ sub command112b {
                 print " ERROR TESTING\n";
                 close $sock;
             } else {
+                $got = <$sock>;  # Discard greeting
                 print $sock "HELO $domain\r\n";
                 $got = <$sock>;  # Discard
                 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.
     if ($service eq 'SMTP') {
-        if (($response =~ /^535/) or ($response =~/^502/)) {
+        if (!($response =~ /^334/)) {
             # Not supported
             print $sock $logout;
             close $sock;
             return 'NO';
-        } elsif ($response =~ /^503/) {
-            #Something went wrong
-            return undef;
         }
     } elsif ($service eq 'IMAP') {
         if ($response =~ /^A01/) {