Usermin email works but Roundcube login fails with user unknown in logs

SYSTEM INFORMATION
OS type and version Debian 12
Virtualmin version 7.10.0

Hello everyone

First of all I have to mention that I’ve been using Webmin for over a decade now and I’m quite familiar with the way it works, but I’m relatively new to Virtualmin. Everything is working fine so far except for one little thing and that is Roundcube (1.6.7 and 1.5.7 script install) which I have also used on various systems for years.

  • I can’t login to Roundcube with the email I’m using. The only thing I’m getting is “Login failed” (using full email for login with correct password). The only thing I’m getting is an entry in my auth log:

auth: pam_unix(dovecot:auth): check pass; user unknown
auth: pam_unix(dovecot:auth): authentication failed; logname= uid=0 euid=0 tty=dovecot ruser=email@adjustedforprivacy.com rhost=127.0.0.1 <

  • I can log in to Roundcube with the Unix username (without @domain), but of course I’m only getting localhost as my mail domain in this case.
  • Sending and receiving email from any email account in Usermin works fine, so there should be no configuration problem with Dovecot or Postfix.
  • None of the solutions I found online like removing virtuser_file from config (its not even there), including domain name in usernames only to avoid a clash, and others work.

Can someone please point me in the right direction?

Thanks

Update: Got it working. My bad, sorry for the post but maybe it’ll help others in the future.

I assumed that Roundcube was unable to find the matching Dovecot user because that user was never created. And I was right.

doveadm user email@adjustedforprivacy.com

returned only

userdb lookup: user email@adjustedforprivacy.com doesn’t exist

which explained why the Roundcube login was not working.

But… as I found out, Dovecot is configured to use the standard Unix user database (which I don’t usually do on my systems), the home directory settings for the users are correct, and the users do exist. However, the mailonly users were missing the @domain part of their names, which Dovecot needs to authenticate the Roundcube user. So, after switching “Include domain name in usernames” back to “Always” with full domain name in the “Defaults for new domains settings” and recreating the mail user, the Roundcube login now works as expected.

Lesson learned, case closed, thanks for reading.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.