diff options
author | thomascube <thomas@roundcube.net> | 2009-05-15 10:22:29 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2009-05-15 10:22:29 +0000 |
commit | 51ede06434097ef8d0697ee204fa998d6445d194 (patch) | |
tree | 76d6362bca66010776af8e8fbb971ba848cc3215 /program/include/rcmail.php | |
parent | 9bee4437b889f4e36e37116ebf1fc24765eecad6 (diff) |
Apply changes from r2348 to r2400 for 0.2.2 release
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r-- | program/include/rcmail.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index f109c16fd..9aad25b27 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -436,11 +436,13 @@ class rcmail if ($a_host['host']) { $host = $a_host['host']; $imap_ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? $a_host['scheme'] : null; - $imap_port = isset($a_host['port']) ? $a_host['port'] : ($imap_ssl ? 993 : $config['default_port']); + if(!empty($a_host['port'])) + $imap_port = $a_host['port']; + else if ($imap_ssl && $imap_ssl != 'tls') + $imap_port = 993; } - else - $imap_port = $config['default_port']; - + + $imap_port = $imap_port ? $imap_port : $config['default_port']; /* Modify username with domain if required Inspired by Marco <P0L0_notspam_binware.org> @@ -453,9 +455,10 @@ class rcmail $username .= '@'.$config['username_domain']; } - // try to resolve email address from virtuser table - if (!empty($config['virtuser_file']) && strpos($username, '@')) - $username = rcube_user::email2user($username); + // try to resolve email address from virtuser table + if (strpos($username, '@')) + if ($virtuser = rcube_user::email2user($username)) + $username = $virtuser; // lowercase username if it's an e-mail address (#1484473) if (strpos($username, '@')) |