bug 1288: EHLO returns 250 on success
authorBenny Baumann <BenBE@geshi.org>
Sat, 29 Nov 2014 13:33:18 +0000 (14:33 +0100)
committerBenny Baumann <BenBE@geshi.org>
Sat, 29 Nov 2014 13:33:18 +0000 (14:33 +0100)
includes/general.php

index ef87670..b3fd121 100644 (file)
                                        fputs($fp, "EHLO www.cacert.org\r\n");
                                        do {
                                                $line = fgets($fp, 4096);
                                        fputs($fp, "EHLO www.cacert.org\r\n");
                                        do {
                                                $line = fgets($fp, 4096);
-                                               $has_starttls |= trim($line) == "220-STARTTLS";
+                                               $has_starttls |= trim($line) == "250-STARTTLS";
                                        } while(substr($line, 0, 4) == "250-");
                                        } while(substr($line, 0, 4) == "250-");
-                                       if(substr($line, 0, 3) != "220") {
+                                       if(substr($line, 0, 3) != "250") {
                                                fclose($fp);
                                                continue;
                                        }
                                                fclose($fp);
                                                continue;
                                        }
                                                fputs($fp, "EHLO www.cacert.org\r\n");
                                                do {
                                                        $line = fgets($fp, 4096);
                                                fputs($fp, "EHLO www.cacert.org\r\n");
                                                do {
                                                        $line = fgets($fp, 4096);
-                                                       $has_starttls |= trim($line) == "220-STARTTLS";
+                                                       $has_starttls |= trim($line) == "250-STARTTLS";
                                                } while(substr($line, 0, 4) == "250-");
                                                } while(substr($line, 0, 4) == "250-");
-                                               if(substr($line, 0, 3) != "220") {
+                                               if(substr($line, 0, 3) != "250") {
                                                        fclose($fp);
                                                        continue;
                                                }
                                                        fclose($fp);
                                                        continue;
                                                }