]> git.mjollnir.org Git - moodle.git/commitdiff
New imap type (imaptls) solved problems with TLS capable servers (eg Courier)
authormoodler <moodler>
Sun, 17 Nov 2002 15:11:35 +0000 (15:11 +0000)
committermoodler <moodler>
Sun, 17 Nov 2002 15:11:35 +0000 (15:11 +0000)
auth/imap/lib.php

index 5d9200933c9e5adc418f3d028434188c77db3ac8..c16faeefd642f9e19e3a83c7529bb9ea7a3f9dff 100644 (file)
@@ -4,8 +4,8 @@
 // This code is completely untested so far  -  IT NEEDS TESTERS!
 // Looks like it should work though ...
 
-$CFG->auth_imaphost   = "202.0.185.16";  // Should be IP number
-$CFG->auth_imaptype   = "imap";   // imap, imapssl, imapcert
+$CFG->auth_imaphost   = "127.0.0.1";  // Should be IP number
+$CFG->auth_imaptype   = "imap";       // imap, imaptls, imapssl, imapcert
 $CFG->auth_imapport   = "143";        // 143, 993
 $CFG->auth_instructions = "Use the same username and password as your school email account";   // Instructions
 
@@ -25,6 +25,10 @@ function auth_user_login ($username, $password) {
             $host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport/imap/ssl/novalidate-cert}INBOX";
         break;
 
+        case "imaptls":
+            $host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport/imap/notls}INBOX";
+        break;
+
         default:
             $host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport}";
     }