Author Topic: Why does RC2 use user@localhost for authenticating against IMAP?  (Read 7587 times)

Offline el_kab0ng

  • Newbie
  • *
  • Posts: 4
Why does RC2 use user@localhost for authenticating against IMAP?
« on: December 22, 2007, 03:10:50 PM »
When logging into the main page of RC, everything works fine. If I attempt to view folders under personal settings, I get an authorization failed because RC attempts to use user@localhost as the user name.

Why does this happen and how can I fix it? I don't want RC to use an @domain username. I'm assuming it's grabbing the @localhost from the mail host option in main.inc.php. I don't want users to select a domain to use for logging in, so I HAVE to set that option. If set to localhost, RC should not use an @domain username.

Quote
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
// $rcmail_config['default_host'] = '';
$rcmail_config['default_host'] = 'localhost';

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;

// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['username_domain'] = '';

// This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['mail_domain'] = '';

Offline el_kab0ng

  • Newbie
  • *
  • Posts: 4
Re: Why does RC2 use user@localhost for authenticating against IMAP?
« Reply #1 on: December 22, 2007, 03:15:19 PM »
For those of you who need error logs:

Round Cube Errors:

Quote
[22-Dec-2007 14:10:57 -0600] IMAP Error: Authentication for user@localhost failed (AUTH): "a000 NO user not found
"Authentication for user@localhost failed (LOGIN): "a001 NO Login failed: user not found" in on line 0
[22-Dec-2007 14:10:57] PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/www/*/program/lib/imap.inc on line 1717
[22-Dec-2007 14:10:57] PHP Warning: Invalid argument supplied for foreach() in /usr/local/www/*/program/include/rcube_imap.inc on line 1579
[22-Dec-2007 14:10:57] PHP Warning: Invalid argument supplied for foreach() in /usr/local/www/*/program/include/rcube_imap.inc on line 2445
[22-Dec-2007 14:10:57] PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/www/*/program/lib/imap.inc on line 1767
[22-Dec-2007 14:10:57] PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/www/*/program/lib/imap.inc on line 1668

IMAP Errors:

Quote
Dec 22 14:10:54 email imap[31260]: badlogin: localhost.* [127.0.0.1] plaintext user@localhost SASL(-13): user not found: checkpass failed

After this happens, my session terminates and I am forced to log back in. At the user/pass login prompt, I can get back in just fine.

IMAP:

Quote
Dec 22 14:15:18 email imap[31340]: login: localhost.* [127.0.0.1] user CRAM-MD5 User logged in

The only differences I can see are that the folders option attempts to login as user@localhost rather than just user and that it attempts a plain text login versus a CRAM-MD5 session.

Any thoughts?

Offline hbidad

  • Newbie
  • *
  • Posts: 1
Re: Why does RC2 use user@localhost for authenticating against IMAP?
« Reply #2 on: January 17, 2008, 09:37:45 PM »
I' having the same issue on a Cpanel install. I can open browse through the folder and see messages, but I can move or delete them. The logout is random.

Code: [Select]
PHP Notice: Authentication for rctest@localhost failed (LOGIN): "a001 NO Login failed." in /usr/local/cpanel/base/roundcube/program/include/bugs.inc on line 95
PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/cpanel/base/roundcube/program/lib/imap.inc on line 1717
PHP Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/roundcube/program/include/rcube_imap.inc on line 1579
PHP Warning: Invalid argument supplied for foreach() in /usr/local/cpanel/base/roundcube/program/include/rcube_imap.inc on line 2445
PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/cpanel/base/roundcube/program/lib/imap.inc on line 1767
PHP Warning: fputs(): supplied argument is not a valid stream resource in /usr/local/cpanel/base/roundcube/program/lib/imap.inc on line 1668
PHP Notice: Authentication for rctest@localhost failed (LOGIN): "a001 NO Login failed." in /usr/local/cpanel/base/roundcube/program/include/bugs.inc on line 95

Code: [Select]
Jan 18 02:50:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:50:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:51:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:51:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:52:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:52:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:53:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:53:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:54:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:54:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:55:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:55:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:56:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:56:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:57:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:57:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0
Jan 18 02:58:37 uk imapd: LOGIN, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Jan 18 02:58:37 uk imapd: LOGOUT, user=chris@testingrc.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=25, sent=180, time=0