Dovecot (unknown user)

I’m using a combination of Dovecot and Postfix 3.3.0 on Ubuntu server 18.04, and have recently (this has probably been going on since day one, which is - way back) been made aware that Dovecot preceeds every login with a line in dovecot-info.log complaining about an unknown user, (where is whatever client trying to connect and the IP varies accordingly for obvious reasons):

auth-worker(21760): Info: passwd(,,): unknown user

This, as far as I can tell, is related to another message logged in the debug.log:

auth: Debug: pam(,,): passdb doesn’t support credential lookups

which leads me to the obvious conclusion that there’s at least one lookup in the wrong place or a misconfigured password file. Relevant part of Dovecots configuration file would be (just to be clear; the file /etc/dovecot/passwd does exist and is using CRAMD5)

passdb {
driver = passwd-file
args = scheme=CRAMD5 /etc/dovecot/passwd
skip = never
result_failure = continue
result_internalfail = continue
result_success = return-ok
auth_verbose = default

Dovecot is accepting valid clients, but this one line in the log file mess things up for Fail2Ban, so I would like to have it sorted if at all possible.

Edit: Strange formatting.

Thank you.

Hi Iznougoud,

Strange issue. Does a verbose doveadm auth testing provide any additional hints on the process of authenticating a user?

The command “sudo doveadm -D auth test” gives me:

Debug: Loading modules from directory: /usr/lib/dovecot/modules/doveadm

Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/ undefined symbol: acl_user_module (this is usually intentional, so just ignore this message)

Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/ undefined symbol: expire_set_deinit (this is usually intentional, so just ignore this message)

Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/ undefined symbol: quota_user_module (this is usually intentional, so just ignore this message)

Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/

Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/ undefined symbol: fts_user_get_language_list (this is usually intentional, so just ignore this message)

Debug: Skipping module doveadm_mail_crypt_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/ undefined symbol: mail_crypt_box_get_pvt_digests (this is usually intentional, so just ignore this message)

passdb: auth failed
extra fields:
**Warning: Auth connection closed with 1 pending requests (max 0 secs, pid=15330, EOF)
Fatal: Couldn’t connect to auth socket

Which essentially tells me that the user for whatever reason can’t be found in the password file defined in /etc/dovecot.conf. The file /etc/dovecot/passwd isn’t a database as such though, and simply lists users and their hashed passwords in the format{CRAM-MD5}hashed_string so for all I know it’s quite possible that Dovecot is looking for the user somewhere else entirely at this point.

What I really don’t understand about the error message, is that it mentions pam, while you configured to use a passwd file directly. Is there maybe some default configuration somewhere that refers to pam as a driver?

Been there. Done that. Well, not really. But almost :). But you’re right, it is curoius. I haven’t been able to find any reference to PAM in Dovecots configuration files, so unless I’ve missed it (which of course is quite possible) it would have to be some sort of global setting overriding Dovecot. We do have /etc/pam.d/dovecot with these five lines:


@include common-auth
@include common-account
@include common-session
auth required nullok
account required"

but as far as I can tell it’s only to be called upon if Dovecot is configured to use PAM. Nevertheless, I’ve tried removing it, but its absence has no effect whatsoever on Dovecots behavoiur.

Other than that, I honestly don’t know where to look.


I had another look around and found a driver setting in /etc/dovecot/conf.d/auth-system.conf.ext:

passdb {
driver = pam

tried changing it to “shadow” which was the only other option, and the log message simply changed from:

auth-worker(15542): Info: pam(,,<hashed_password>): unknown user


auth-worker(15542): Info: shadow(,,<hashed_password>): unknown user

In both cases the user managed to successfully connect, send and receive mail after the initial authorization failure.

which points to something other than pam being the culprit here.

Edit 2 (solved):

As it turns out, the line !include auth-system.conf.ext in /etc/dovecot/conf.d/10-auth.conf was uncommented. Once said line was deactivated, Dovecot stopped looking for the user in all the wrong places (anyone who gets that reference is at least 40 years old and should be ashamed of (most likely) himself).

doveadm auth test still fails though, so there’s probably more to this than meets the eye.

And last (but not least); thank you for helping me out.

1 Like