Unable to see virtual users

Randall Gellens dovecot at randy.pensive.org
Fri Nov 21 00:44:44 UTC 2014


I have a new Dovecot v2.2.9 installation and am having trouble 
getting virtual users recognized.

Also, the example configuration listed on the Wiki generates config errors.

Note that I haven't tried running dovecot yet, I wanted to verify 
that the config looked good first.

First, my configuration.  I'm trying to use /etc/dovecot/users as my 
combined userdb and passdb file, with all users having a UID/GID of 
vmail, and a home directory of /local/mnt/home/<user>

----------

$ sudo doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-39-generic x86_64 Ubuntu 14.04.1 LTS ext4
auth_verbose = yes
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = mdbox:/local/mnt/mail/%n
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 ihave
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 {
   args = username_format=%n /etc/dovecot/users
   driver = passwd-file
}
passdb {
   driver = pam
}
plugin {
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
}
postmaster_address = randy at qti.qualcomm.com
protocols = " imap sieve pop3"
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
   args = username_format=%n /etc/dovecot/users
   default_fields = uid=vmail gid=vmail home=/local/mnt/home/%n
   driver = passwd-file
}
userdb {
   driver = passwd
}

----------

Next, my /etc/dovecot/users file:

$ cat /etc/dovecot/users
fred:x
test:{SSHA}amehbJZYxKWuIbywINVNWxKcPrWi27a+
poptest2:x
poptest3:x

----------

If I ask dovecot what it knows about user 'test' it says the user 
doesn't exist:

$ sudo doveadm user test
field	valueuserdb lookup: user test doesn't exist

----------

If I ask about a user in /etc/passwd, it finds it:

$ sudo doveadm user nobody
field	value
uid	65534
gid	65534
home	/nonexistent
mail	mdbox:/local/mnt/mail/nobody
system_groups_user	nobody

----------

As an aside, when I copied the sample config entries from 
http://wiki2.dovecot.org/UserDatabase it got config errors:

userdb {
   driver = passwd-file
   args = username_format=%n /etc/dovecot/users

   default_fields = uid=vmail gid=vmail
   override_fields =

   skip = never

   result_failure = continue
   result_internalfail = continue
   result_success = return-ok
}

The 'skip', 'result_failure', etc. entries all generated config 
errors as being unknown.  Since these were just explicitly setting 
config variables to their default values, I deleted them.  It does 
seem odd that the config sample from the Wiki generated errors though.



-- 
Randall Gellens
Opinions are personal;    facts are suspect;    I speak for myself only
-------------- Randomly selected tag: ---------------
The difference between stupidity and genius is that genius has its limits.
    --Albert Einstein


More information about the dovecot mailing list