1 (edited by Jedi 2023-02-05 17:33:06)

Topic: Cant log into Roundcube after upgrade

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.5.0
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Ubuntu 22.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro?No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

After upgrading from Ubuntu 20.04 to 22.04 I can't log into Roundcube.

It says "Login failed".

I noticed this when upgrading mlmmjadmin

root@mail:~/mlmmjadmin-3.1.5/tools# bash upgrade_mlmmjadmin.sh
* Detected Linux/BSD distribution: UBUNTU
Install package: python3 python3-pip python3-requests uwsgi-plugin-python3 python3-pymysql
* Found mlmmjadmin: /opt/mlmmjadmin, symbol link of /opt/mlmmjadmin-3.1.2
* Found old config file: /opt/mlmmjadmin/settings.py
* Copying new version to /opt/mlmmjadmin-3.1.5
* Copy /opt/mlmmjadmin/settings.py.
* Removing old symbol link /opt/mlmmjadmin
* Creating symbol link: /opt/mlmmjadmin-3.1.5 -> /opt/mlmmjadmin
* Copy systemd service file.
'/opt/mlmmjadmin/rc_scripts/systemd/debian.service' -> '/lib/systemd/system/mlmmjadmin.service'
Created symlink /etc/systemd/system/multi-user.target.wants/mlmmjadmin.service -> /lib/systemd/system/mlmmjadmin.service.
* mlmmjadmin has been successfully upgraded.
* Restarting service: mlmmjadmin.
* Sync mailing list profiles to SQL/LDAP.
No mailing list found. Abort.
* Upgrading completed.
<<< NOTE >>> If mlmmjadmin doesn't work as expected, please post your issue in
<<< NOTE >>> our online support forum: http://www.iredmail.org/forum/

What does "No mailing list found" mean?

root@mail:/home/mike# tail '/var/log/mail.log' 
Feb  4 19:24:32 mail dovecot: auth-worker(868491): Error: conn unix:auth-worker (pid=868487,uid=130): auth-worker<6>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb  4 19:24:32 mail dovecot: lda(postmaster@odysseytours.nz)<868502><>: Error: auth-master: userdb lookup(postmaster@odysseytours.nz): Auth USER lookup failed
Feb  4 19:24:32 mail dovecot: lda(868502): Fatal: Internal error occurred. Refer to server log for more information.
Feb  4 19:24:32 mail postfix/pipe[868485]: 4P7Jlx72C8z1Dn: to=<postmaster@odysseytours.nz>, orig_to=<root@mail.odysseytours.nz>, relay=dovecot, delay=102211, delays=102211/0.02/0/0.05, dsn=4.3.0, status=deferred (temporary failure. Command output: lda(postmaster@odysseytours.nz): Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission denied )
Feb  4 19:24:32 mail postfix/pipe[868480]: 4P7kwn0sZcz1bm: to=<postmaster@odysseytours.nz>, orig_to=<root@mail.odysseytours.nz>, relay=dovecot, delay=42264, delays=42264/0.05/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: lda(postmaster@odysseytours.nz): Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission denied )
Feb  4 19:24:32 mail postfix/pipe[868498]: 4P7GHb4XhXznW: to=<postmaster@odysseytours.nz>, orig_to=<root@mail.odysseytours.nz>, relay=dovecot, delay=108885, delays=108885/0.05/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: lda(postmaster@odysseytours.nz): Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission denied )
Feb  4 19:24:32 mail dovecot: auth-worker(868504): Error: conn unix:auth-worker (pid=868487,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb  4 19:24:32 mail dovecot: lda(postmaster@odysseytours.nz)<868490><>: Error: auth-master: userdb lookup(postmaster@odysseytours.nz): Auth USER lookup failed
Feb  4 19:24:32 mail dovecot: lda(868490): Fatal: Internal error occurred. Refer to server log for more information.
Feb  4 19:24:32 mail postfix/pipe[868488]: 4P7Jlx74KYz1Dq: to=<postmaster@odysseytours.nz>, orig_to=<root@mail.odysseytours.nz>, relay=dovecot, delay=102211, delays=102211/0.02/0/0.06, dsn=4.3.0, status=deferred (temporary failure. Command output: lda(postmaster@odysseytours.nz): Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission denied )

I tried adding

service stats {
    unix_listener stats-reader {
        user = vmail
        group = vmail
        mode = 0660
    }

    unix_listener stats-writer {
        user = vmail
        group = vmail
        mode = 0660
    }
}

to /etc/dovecot/dovecot.conf now it says

Feb  4 20:04:49 mail roundcube: <ihqm485t> IMAP Error: Login failed for postmaster@odysseytours.nz against 127.0.0.1 from 192.168.1.1. Unsupported authentication mechanism. in /opt/www/roundcubemail-1.4.7/program/lib/Roundcube/rcube_imap.php on line 211 (POST /mail/?_task=login&_action=login)
Feb  4 20:04:49 mail dovecot: imap-login: Disconnected: Connection closed (tried to use unsupported auth mechanism): user=<>, method=LOGIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<5mvxadrzqMF/AAAB>
Feb  4 20:04:50 mail roundcube: PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/www/roundcubemail-1.4.7/program/include/rcmail_output_html.php on line 1612
Feb  4 20:06:14 mail roundcube: PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/www/roundcubemail-1.4.7/program/include/rcmail_output_html.php on line 1612
Feb  4 20:06:18 mail dovecot: imap-login: Disconnected: Connection closed (tried to use unsupported auth mechanism): user=<>, method=LOGIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<U8c8b9rzCKV/AAAB>
Feb  4 20:06:18 mail roundcube: <d4n71kmh> IMAP Error: Login failed for info@shesheds.co.nz against 127.0.0.1 from 127.0.0.1. Unsupported authentication mechanism. in /opt/www/roundcubemail-1.4.7/program/lib/Roundcube/rcube_imap.php on line 211 (POST /mail/?_task=login&_action=login)
Feb  4 20:06:19 mail roundcube: PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/www/roundcubemail-1.4.7/program/include/rcmail_output_html.php on line 1612

I tried logging into ireadmin and resetting the password

What does this mean?

 php8.1-fpm.service - The PHP 8.1 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php8.1-fpm.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2023-02-05 19:15:57 NZDT; 1h 55min ago
       Docs: man:php-fpm8.1(8)
   Main PID: 4395 (php-fpm8.1)
     Status: "Processes active: 0, idle: 2, Requests: 6, slow: 0, Traffic: 0req/sec"
      Tasks: 3 (limit: 28584)
     Memory: 25.3M
        CPU: 564ms
     CGroup: /system.slice/php8.1-fpm.service
             ├─4395 "php-fpm: master process (/etc/php/8.1/fpm/php-fpm.conf)" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             ├─4633 "php-fpm: pool www" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             └─4634 "php-fpm: pool www" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Feb 05 19:17:31 mail.odysseytours.nz roundcube[4634]: <ihqm485t> IMAP Error: Login failed for postmaster@odysseytours.nz against 127.0.0.1 from 192.168.1.1. Unsupported authentication mechanism. in /opt/www/roundcubemail-1.4.7/program/lib/Roundcube/rcube_imap.php on line 211 (POST /mail/?_task=login&_action=login)
Feb 05 19:17:32 mail.odysseytours.nz roundcube[4634]: PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/www/roundcubemail-1.4.7/program/include/rcmail_output_html.php on line 1612
Feb 05 19:17:37 mail.odysseytours.nz roundcube[4633]: <ihqm485t> IMAP Error: Login failed for postmaster@odysseytours.nz against 127.0.0.1 from 192.168.1.1. Unsupported authentication mechanism. in /opt/www/roundcubemail-1.4.7/program/lib/Roundcube/rcube_imap.php on line 211 (POST /mail/?_task=login&_action=login)
Feb 05 19:17:38 mail.odysseytours.nz roundcube[4633]: PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/www/roundcubemail-1.4.7/program/include/rcmail_output_html.php on line 1612

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cant log into Roundcube after upgrade

- Try to upgrade Roundcube to latest 1.6.1, it supports PHP 8.1.
- Check Dovecot log file, make sure all errors are fixed.

3

Re: Cant log into Roundcube after upgrade

Have upgraded to Roundcube 1.6.1

● dovecot.service - Dovecot IMAP/POP3 email server
     Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-02-06 18:18:07 NZDT; 1h 47min ago
       Docs: man:dovecot(1)
             https://doc.dovecot.org/
   Main PID: 1586294 (dovecot)
     Status: "v2.3.16 (7e2e900c1a) running"
      Tasks: 5 (limit: 28584)
     Memory: 5.5M
        CPU: 858ms
     CGroup: /system.slice/dovecot.service
             ├─1586294 /usr/sbin/dovecot -F
             ├─1586297 dovecot/anvil
             ├─1586298 dovecot/log
             ├─1586299 dovecot/config
             └─1588179 dovecot/stats

Feb 06 19:36:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1920528): Error: conn unix:auth-worker (pid=1920524,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:46:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1931727): Error: conn unix:auth-worker (pid=1931725,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:46:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1931728): Error: conn unix:auth-worker (pid=1931725,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:46:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1931730): Error: conn unix:auth-worker (pid=1931725,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:46:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1931732): Error: conn unix:auth-worker (pid=1931725,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:51:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1936983): Error: conn unix:auth-worker (pid=1936982,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:56:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1942758): Error: conn unix:auth-worker (pid=1942756,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:56:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1942759): Error: conn unix:auth-worker (pid=1942756,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:56:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1942761): Error: conn unix:auth-worker (pid=1942756,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb 06 19:56:09 mail.odysseytours.nz dovecot[1586298]: auth-worker(1942762): Error: conn unix:auth-worker (pid=1942756,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
~
lines 1-27/27 (END)

this is despite having

listen = *

in /etc/dovecot/dovecot.conf

4

Re: Cant log into Roundcube after upgrade

Did you modify any Dovecot config in /etc/dovecot/dovecot.conf? Seems it's messy.
Please show us full command output for troubleshooting:

doveconf -n

5 (edited by Jedi 2023-02-10 03:29:26)

Re: Cant log into Roundcube after upgrade

Hi Zhang,

Thank you for taking the time to help me.

root@mail:/home/mike# doveconf -n
# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.16 (09c29328)
# OS: Linux 5.15.0-58-generic x86_64 Ubuntu 22.04.1 LTS 
# Hostname: mail.odysseytours.nz
listen = *
mail_debug = yes
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
}
protocols = " imap lmtp sieve pop3"
service stats {
  unix_listener stats-reader {
    group = vmail
    mode = 0660
    user = vmail
  }
  unix_listener stats-writer {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_cipher_list = EECDH+CHACHA20:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
  driver = passwd
}

Here is some output from /var/log/mail.log

Feb  7 15:16:09 mail dovecot: auth-worker(3171287): Error: conn unix:auth-worker (pid=3171278,uid=130): auth-worker<1>: passwd(postmaster@odysseytours.nz): getpwnam() failed: Address family not supported by protocol
Feb  7 15:16:09 mail dovecot: lda(postmaster@odysseytours.nz)<3171280><>: Error: auth-master: userdb lookup(postmaster@odysseytours.nz): Auth USER lookup failed
Feb  7 15:16:09 mail dovecot: lda(postmaster@odysseytours.nz)<3171280><>: Debug: auth-master: userdb lookup(postmaster@odysseytours.nz): auth USER input: 
Feb  7 15:16:09 mail dovecot: lda(postmaster@odysseytours.nz)<3171280><>: Debug: auth-master: userdb lookup(postmaster@odysseytours.nz): Userdb lookup failed
Feb  7 15:16:09 mail dovecot: lda(3171280): Fatal: Internal error occurred. Refer to server log for more information.
Feb  7 15:16:09 mail postfix/pipe[3171276]: 4P7bPV1Kzqz1RJ: to=<postmaster@odysseytours.nz>, orig_to=<root@mail.odysseytours.nz>, relay=dovecot, delay=306907, delays=306907/0.02/0/0.05, dsn=4.3.0, status=deferred (temporary failure)

Some more info

root@mail:/home/mike# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 6095
Server version: 10.6.11-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| amavisd            |
| fail2ban           |
| information_schema |
| iredadmin          |
| iredapd            |
| mysql              |
| performance_schema |
| roundcubemail      |
| sogo               |
| sys                |
| vmail              |
+--------------------+
11 rows in set (0.001 sec)

MariaDB [(none)]> use roundcubemail;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [roundcubemail]> show tables;
+-------------------------+
| Tables_in_roundcubemail |
+-------------------------+
| cache                   |
| cache_index             |
| cache_messages          |
| cache_shared            |
| cache_thread            |
| collected_addresses     |
| contactgroupmembers     |
| contactgroups           |
| contacts                |
| dictionary              |
| filestore               |
| identities              |
| responses               |
| searches                |
| session                 |
| system                  |
| users                   |
+-------------------------+
17 rows in set (0.001 sec)

MariaDB [roundcubemail]> select * from users;
+---------+----------------------------+-----------+---------------------+---------------------+---------------------+----------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| user_id | username                   | mail_host | created             | last_login          | failed_login        | failed_login_counter | language | preferences                                                                                                                                                                                                                                                                                                                                          |
+---------+----------------------------+-----------+---------------------+---------------------+---------------------+----------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|       1 | postmaster@odysseytours.nz | 127.0.0.1 | 2020-08-20 13:19:03 | 2023-02-02 23:15:26 | 2023-02-08 03:06:51 |                    3 | en_GB    | a:4:{s:11:"search_mods";a:4:{s:1:"*";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:4:"Sent";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:6:"Drafts";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:5:"INBOX";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}}s:17:"message_threading";a:1:{s:5:"INBOX";b:1;}s:4:"skin";s:5:"larry";s:11:"client_hash";s:16:"MnpDSqVvFZZ8gPhu";} |
|       2 | info@shesheds.co.nz        | 127.0.0.1 | 2020-08-20 13:20:41 | 2023-02-02 23:18:59 | 2023-02-08 03:07:07 |                    2 | en_GB    | a:3:{s:11:"search_mods";a:5:{s:1:"*";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}s:4:"Sent";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:6:"Drafts";a:2:{s:7:"subject";i:1;s:2:"to";i:1;}s:5:"INBOX";a:1:{s:4:"text";i:1;}s:5:"Trash";a:2:{s:7:"subject";i:1;s:4:"from";i:1;}}s:4:"skin";s:5:"larry";s:11:"client_hash";s:16:"Ikrz9oLhNa2TXvDU";}               |
|       3 | info@odysseytours.nz       | 127.0.0.1 | 2020-08-20 13:28:16 | 2023-01-18 19:35:34 | NULL                |                 NULL | en_GB    | a:2:{s:4:"skin";s:5:"larry";s:11:"client_hash";s:16:"UehcaBF4GdM5NLGp";}                                                                                                                                                                                                                                                                             |
|       4 | info@sales.odysseytours.nz | 127.0.0.1 | 2020-12-24 00:04:52 | 2020-12-24 00:04:52 | NULL                |                 NULL | en_GB    | a:1:{s:11:"client_hash";s:16:"IJJYDAR193chEe3R";}                                                                                                                                                                                                                                                                                                    |
+---------+----------------------------+-----------+---------------------+---------------------+---------------------+----------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 rows in set (0.000 sec)

MariaDB [roundcubemail]> 

Why does it say "Userdb lookup failed" when I can see the user in the database?

6

Re: Cant log into Roundcube after upgrade

root@mail:/home/mike# doveadm user -f 'username' '*'
nobody
mike
systemd-coredump
sogo
vmail
mlmmj
iredadmin
iredapd
snapd-range-524288-root
snap_daemon
Error: auth-master: userdb list: User listing returned failure
Fatal: user listing failed

Hi Zhang do you have any trouble shooting tips to help me identify the issue?

7

Re: Cant log into Roundcube after upgrade

Your dovecot.conf file is completely messy (based on the output of "doveconf -n" in your post), it doesn't even have "userdb" and "passdb" to query SQL db.

Sample dovecot.conf generated by iRedMail installer (note: it contains many placeholders, you can not simply download it and override the one on your server):
https://github.com/iredmail/iRedMail/bl … vecot.conf

8

Re: Cant log into Roundcube after upgrade

Do you have any dovecot.conf (generated by iRedMail) backup under /etc/dovecot/?
Deb package may backup existing config file during installation, find it and override the default one shipped by deb package.

Or, setup a VM (with same OS and release) and install latest iRedMail-1.6.2 to get a working dovecot.conf, then copy it to your server.

9

Re: Cant log into Roundcube after upgrade

Do you have "log_warnings = 1" in MySQL config file (under "[mysqld]" section)?