Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29755

Roundcube IMAP AUTHENTICATE PLAIN Error on Debian

$
0
0

I have own VPS server (Debian 10) and domain with A and MX records to my IP address of VPS. Installed LAMP with SSL cert, Postfix and Dovecot, but want to install Roundcube email client.

I installed Dovecot with Postfix by following manual: https://www.howtoforge.com/perfect-server-debian-10-buster-apache-bind-dovecot-ispconfig-3-1/#-install-postfix-dovecot-mariadb-rkhunter-andnbspbinutils

Next, I installed / downloaded Roundcube by following manual: https://www.rosehosting.com/blog/how-to-install-roundcube-webmail-on-debian-9/

So, I set up Apache Virutal host for webmail.mydomain.com and it works OK!

I done all with both manual from webpages, but problem get started:

Setting up http://webmail.mydomain.com/installer/ is done.

When I tried SMTP Config test - it works OK, but if tried IMAP Config test - I´m getting following error:

Connecting to localhost... IMAP connect: NOT OK(Login failed for support@mydomain.com from 95.105.224.114. AUTHENTICATE PLAIN: Authentication failed.)

LOG file from Dovecot and mail transfer:

root@server:~# tail -f /var/log/mail.log
Nov 03 20:25:54 auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Nov 03 20:25:54 auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
Nov 03 20:25:54 auth: Debug: auth client connected (pid=8529)
Nov 03 20:25:54 auth: Debug: client in: AUTH    1       PLAIN   service=imap    secured session=FbT6KnaWQpJ/AAAB        lip=127.0.0.1   rip=127.0.0.1   lport=143      rport=37442     resp=AHN1cHBvcnRAd2l4eS5uZXR3b3JrAGFjY2VzYm94 (previous base64 data may contain sensitive data)
Nov 03 20:25:54 auth-worker(8531): Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Nov 03 20:25:54 auth-worker(8531): Debug: Module loaded: /usr/lib/dovecot/modules/auth/lib20_auth_var_expand_crypt.so
Nov 03 20:25:54 auth-worker(8531): Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Nov 03 20:25:54 auth-worker(8531): Debug: pam(support@mydomain.com,127.0.0.1,<FbT6KnaWQpJ/AAAB>): lookup service=dovecot
Nov 03 20:25:54 auth-worker(8531): Debug: pam(support@mydomain.com,127.0.0.1,<FbT6KnaWQpJ/AAAB>): #1/1 style=1 msg=Password:
Nov 03 20:25:56 auth-worker(8531): Info: pam(support@mydomain.com,127.0.0.1,<FbT6KnaWQpJ/AAAB>): pam_authenticate() failed: Authentication failure (Password mismatch?) (given password: accesbox)
Nov 03 20:25:58 auth: Debug: client passdb out: FAIL    1       user=support@mydomain.com
Nov 03 20:25:58 imap-login: Info: Disconnected (auth failed, 1 attempts in 4 secs): user=<support@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<FbT6KnaWQpJ/AAAB>

Database with user created:

mysql -u root -p
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS `roundcube` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON roundcube.* TO support@localhost IDENTIFIED BY 'pass';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> quit

Here are screenshots of Roundcube installer settings:

Output of IMAP Test config

Output of Roundcube config page with server and created DB options

Code segments:

/var/www/roundcube/config/config.inc.php content:

<?php

/* Local configuration for Roundcube Webmail */

// ----------------------------------
// SQL DATABASE
// ----------------------------------
// Database connection string (DSN) for read+write operations
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
//       or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
$config['db_dsnw'] = 'mysql://support:pass@localhost/roundcube';

// ----------------------------------
// IMAP
// ----------------------------------
// The IMAP 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/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$config['default_host'] = 'localhost';

// provide an URL where a user can get support for this Roundcube installation
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
$config['support_url'] = 'https://www.maydomain.com/support';

// This key is used for encrypting purposes, like storing of imap password
// in the session. For historical reasons it's called DES_key, but it's used
// with any configured cipher_method (see below).
$config['des_key'] = 'PToKeCxmg2SLDZ1jzU9BTeBw';

// ----------------------------------
// PLUGINS
// ----------------------------------
// List of active plugins (in plugins/ directory)
$config['plugins'] = array('archive', 'emoticons', 'help', 'identicon', 'password', 'userinfo',   'zipdownload');

// the default locale setting (leave empty for auto-detection)
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
$config['language'] = 'sk-SK';

/etc/dovecot/conf.d/10-auth.conf contentwith uncommented lines only:

disable_plaintext_auth = yes
#auth_username_format = %n
auth_mechanisms = plain login

in /etc/dovecot/conf.d/10-mail.conf is mail location set up by following:

mail_location = mbox:~/mail:INBOX=/var/mail/%u

When I open Roundcube login form ( webmail.mydomain.com ), it doesn´t work too - login failed message getting when trying to log in.

How can I fix this? I tried everything from Google, but still don´t know where is error in configuration. Postfix is working fine, if I sending an e-mail from Webmin tool. I think, the problem is in Dovecot settings, but where?


Viewing all articles
Browse latest Browse all 29755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>