Author Topic: IMAP Error: Login failed for LOGIN: Plaintext authentication not allowed  (Read 6119 times)

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Hello forum,

I have Roundcube v 1.3.10 running on Fedora 30.

I am getting this error on login even though I am logging in on an https connection:

IMAP Error: Login failed for LOGIN: Plaintext authentication not allowed without SSL/TLS, but your client did it anyway. If anyone was listening, the password was exposed.

dovecot config has ssl = yes (does not have ssl = required)

Thunderbird is able to access the same IMAP account via STARTTLS just fine.

roundcube & smtp are on the same server (there is no smtp_server set).

I must have missed a setting somewhere ?

I have tried rcube settings:
$config['default_host'] = 'ssl://localhost';
$config['default_host'] = 'tls://localhost';
$config['default_host'] = 'ssl://<domain>';
$config['default_host'] = 'tls://<domain>';
...and I get these errors in roundcube log...
IMAP Error: Login failed for crh20200219f from <IP>. Unable to negotiate TLS ...
IMAP Error: Login failed for crh20200219f from <IP>. Could not connect to ssl://localhost:993: Unknown reason ...

I also obtained the letsencrypt CA cert and tried the following rcmail config:
$config['imap_conn_options'] = array(
 'ssl'         => array(
    'verify_peer'  => false,
    'verify_depth' => 3,
    'cafile'       => '/scripts/letsencrypt-ca.crt',
  ),
);

I also tried...
$config['imap_auth_type'] = LOGIN;
... and got this error...
[19-Feb-2020 18:14:45 -0600]: <o5uvgs16> IMAP Error: Login failed for crh20200219f from 72.215.138.70. Login disabled by IMAP server in /var/www/html/roundcube/program/lib/Roundcube/rcube_imap.php on line 196 (POST /?_task=login&_action=login)
... then I tried ...
$config['imap_auth_type'] = PLAIN;
... and got this error ...
[19-Feb-2020 18:24:47 -0600]: <o5uvgs16> IMAP Error: Login failed for crh20200219f from 72.215.138.70. AUTHENTICATE PLAIN: Authentication failed. in /var/www/html/roundcube/program/lib/Roundcube/rcube_imap.php on line 196 (POST /?_task=login&_action=login)

Thanks in advance for assistance with this.

« Last Edit: February 19, 2020, 07:40:53 PM by boxyball »

Offline boxyball

  • Full Member
  • ***
  • Posts: 92
Re: IMAP Error: Login failed for LOGIN: Plaintext authentication not allowed
« Reply #1 on: February 20, 2020, 10:32:54 AM »
I solved the problem.
I am posting the resolution to help those with similar problem in the future.
Turns out I was using the wrong CA cert for letsencrypt.
I needed to use the CHAIN cert in the settings below:

$config['default_host'] = 'ssl://<domain>';
...
$config['imap_conn_options'] = array(
 'ssl'         => array(
    'verify_peer'  => false,
    'verify_depth' => 3,
    'cafile'       => '/var/www/html/roundcube/config/chain.pem',
  ),
);

Offline roger2

  • Jr. Member
  • **
  • Posts: 11
If you found the problem I would LOVE to hear it.

MANY MANY peeps ALSO would going by how OFTEN this same problem is reported.

TIA
Roger

Offline roger2

  • Jr. Member
  • **
  • Posts: 11
I since noticed boxyball posted an answer on a different thread.