Opened 3 years ago

Closed 3 years ago

#1486864 closed Bugs (fixed)

Default IMAP port ignored

Reported by: prisma Owned by:
Priority: 3 Milestone: 0.4-stable
Component: IMAP connection Version: 0.3-stable
Severity: normal Keywords: Default IMAP port ignored
Cc:

Description (last modified by thomasb)

Config:

$rcmail_config['default_host'] = 'ssl://dummy.dyndns.org';
$rcmail_config['default_port'] = 30993;

Problem:
RC always tries to connect to 993 instead of 30993. Port is reachable, tested with telnet. If Imap-Server configured to 993, login works. So, RC definitely and simply tries only 993, $rcmail_config['default_port'] is ignored.

Work-around actually:

$rcmail_config['default_host'] = 'ssl://dummy.dyndns.org:30993';

Change History (3)

comment:1 Changed 3 years ago by dennylin93

Looks like $rcmail_configdefault_port? is meant for IMAP connections only (no SSL and TLS):
$a_host = parse_url($host);
if ($a_hosthost?) {

$host = $a_hosthost?;
$imap_ssl = (isset($a_hostscheme?) && in_array($a_hostscheme?, array('ssl','imaps', 'tls'))) ? $a_hostscheme? : null;
if(!empty($a_hostport?))

$imap_port = $a_hostport?;

else if ($imap_ssl && $imap_ssl != 'tls')

$imap_port = 993;

}

Not sure if this is a bug or intentional.

comment:2 Changed 3 years ago by dennylin93

The code is messed up. Can be found in login() in rcmail.php.

comment:3 Changed 3 years ago by thomasb

  • Description modified (diff)
  • Resolution set to fixed
  • Severity changed from major to normal
  • Status changed from new to closed

Fixed in [90480945]

Note: See TracTickets for help on using tickets.