I have Dovecot v2.0.11 installed on a FreeBSD server and the user lookups for incoming email addresses are failing, but lookups for system users is successful.
Dovecot is setup to use system users, so my dovecot.conf has
userdb {
driver = passwd
}
and
passdb {
driver = passwd
}
I have auth debug enabled.
For example, I have a user called webmaster, and using doveadm user for "webmaster" works as follows:
#doveadm user webmaster
userdb: webmaster
system_groups_user: webmaster
uid : 1020
gid : 1020
home : /home/webmaster
However using doveadm user to lookup [email protected] fails as follows:
# doveadm user [email protected]
userdb lookup: user [email protected] doesn't exist
This is resulting in incoming mail for [email protected] to bounce with an "unknown user" error.
Here's the failure logged in /var/log/maillog:
Apr 16 20:13:35 www dovecot: auth: passwd([email protected]): unknown user
Here's the failure logged in /var/log/debug.log:
Apr 16 20:13:35 www dovecot: auth: Debug: master in: USER 1 [email protected] service=doveadm
Apr 16 20:13:35 www dovecot: auth: Debug: passwd([email protected]): lookup
Apr 16 20:13:35 www dovecot: auth: Debug: master out: NOTFOUND 1
The users and their home directories were imported from another server and the users were setup using the vipw tool. I'm sure there's someting I missed on the import that's not "linking" the system user with the dovecot lookup.
Any ideas about what that something may be?
EDIT: Using BillThor's advice, I updated dovecot.conf as follows:
#doveconf -n passdb userdb
passdb {
args = username_format=%n
driver = passwd
}
userdb {
args = username_format=%n
driver = passwd
}
However, now, doveadm user fails in a different fashion:
#doveadm user [email protected]
doveadm(root): Error: userdb lookup([email protected]): Disconnected unexpectedly
doveadm(root): Fatal: userdb lookup failed for [email protected]
And, it no longer works for users without a domain:
#doveadm user webmaster
doveadm(root): Error: userdb lookup(webmaster): Disconnected unexpectedly
doveadm(root): Fatal: userdb lookup failed for webmaster
When I get the above messages, the following is in /var/log/maillog:
Apr 17 17:30:02 www dovecot: auth: Fatal: passdb passwd: Unknown setting: username_format=%u
Apr 17 17:30:02 www dovecot: master: Error: service(auth): command startup failed, throttling