1

Topic: new users cannot log in

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.1
- Deployed with iRedMail Easy or the downloadable installer? Downloadable
- Linux/BSD distribution name and version: Rocky Linux release 8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PostgreSQL
- 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.
====

For the first time in a while I have added a new user.  That user cannot log in through the web user interface.  Other users can still log in as they have been able to before.

I have looked at the nginx logs and access.log only has the access and no error.

error.log has lots of entries for that timestamp, but nothing looks unusual.

I enabled debugging for dovecot, but nothing was written to the imap log.

I enabled roundcube debugging and simply saw:
... Failed login for nuter726 from 10.212.134.100 in session 51726jntkl4vlg46 (error: 1)

Testing the account with an IMPA client (thunderbird) rather than the web interface works fine.

I found a previous post and tried the updatedb.sh command in it, but there was no output.

Still the user cannot log in through Roundcube.

----

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

2

Re: new users cannot log in

george wrote:

For the first time in a while I have added a new user.

How did you add the user account?
Any related error in /var/log/dovecot/*.log?

3

Re: new users cannot log in

ZhangHuangbin wrote:
george wrote:

For the first time in a while I have added a new user.

How did you add the user account?
Any related error in /var/log/dovecot/*.log?

Thank you for your response.

The user was added through the iRedMail web interface.

There has been nothing written to /var/log/dovecot/*.log  since 09/2021 for some reason.  I did find a lot of dovecot logs in /var/log/messages, however.  When I searched for dovecot logs with that userid in them, I find pairs of log entries like this:
Feb 16 16:01:47 notreal.system.name dovecot[1125176]: imap-login: Login: user=<nuter726@maildomain.com>, method=LOGIN, rip=127.0.0.1, lip=127.0.0.1, mpid=1125427, secured, session=<tb5Jgdf0bNR/AAAB>
Feb 16 16:01:47 notreal.system.name dovecot[1125176]: imap(nuter726@maildomain.com)<1125427><tb5Jgdf0bNR/AAAB>: Disconnected: Logged out in=29 out=608 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

Which do not look unusual to me.

Thank you.

4 (edited by george 2023-02-20 21:09:37)

Re: new users cannot log in

Since IMAP with a client other than Roundcube works, I'm guessing the problem is between Roundcube and Dovecot.  What information can I provide to help guide us to the issue?

Thank you, Zhang!

5

Re: new users cannot log in

I enabled debugging on roundcube and dovecot.

I see this in the roundcube logging output for the user:

Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [1] SELECT "vars", "ip", "changed", now() AS ts, CASE WHEN "changed" < now() - interval '600 seconds' THEN 1 ELSE 0 END AS expired FROM "session" WHERE "sess_id" = 'qhbs1lrs1ocfee2ut5g38tl3gm';
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [2] DELETE FROM "session" WHERE "sess_id" = 'qhbs1lrs1ocfee2ut5g38tl3gm';
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [3] SELECT * FROM "users" WHERE "mail_host" = '127.0.0.1' AND "username" = 'user@server.com';
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] Connecting to 127.0.0.1:143...
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] C: A0001 AUTHENTICATE LOGIN
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: + VXNlcm5hbWU6
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] C: ****** [34]
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: + UGFzc3dvcmQ6
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] C: ****** [14]
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: A0001 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE LITERAL+ NOTIFY SPECIAL-USE QUOTA ACL RIGHTS=texk] Logged in
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] C: A0002 ID ("name" "Roundcube" "version" "1.5.3" "php" "7.2.24" "os" "Linux" "command" "/mail/?_task=login")
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: * ID ("name" "Dovecot")
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: A0002 OK ID completed (0.001 + 0.000 secs).
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] C: A0003 NAMESPACE
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: * NAMESPACE (("" "/")) (("Shared/" "/")) NIL
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> [0E21] S: A0003 OK Namespace completed (0.001 + 0.000 secs).
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> PHP Error: Access denied for new user user@server.com. 'auto_create_user' is disabled in /opt/www/roundcubemail-1.5.3/program/include/rcmail.php on line 810 (POST /mail/?_task=login&_action=login)
Feb 20 11:17:21 mail-01-l30.lbwl.ot roundcube[1861768]: <qhbs1lrs> Failed login for user@server.com from 10.212.134.100 in session qhbs1lrs1ocfee2u (error: 0)

I have changed the user's name to "user@server.com".

I can see that the user has already been created in the iRedAdmin user interface, however.

6

Re: new users cannot log in

It appears that I missed an item in the 1.6.0 upgrade of Roundcube and I hadn't set:
$config["auto_create_user"] = true;

Changing that setting got the user working.

Thank you, Zhang!