I've setup dovecot to auth both system and virtual users but it is refusing
to work. It keeps saying user is not found. Is there something more that I
need to set?
dovecot.conf:
===========================================================================
default_mail_env = maildir:/var/mail/%1.1u/%u/Maildir
mail_extra_groups = mail
protocol imap {
}
protocol pop3 {
}
protocol lda {
postmaster_address = postmaster at example.com
}
auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes
auth default {
mechanisms = plain
passdb passwd-file {
args = /etc/dovecot.deny
deny = yes
}
passdb passwd-file {
args = /etc/imap.passwd
}
passdb pam {
}
userdb passwd {
}
user = root
}
dict {
}
plugin {
}
===========================================================================
maillog:
===========================================================================Oct
30 20:12:00 grp-01-10-01 dovecot: Killed with signal 15
Oct 30 20:12:03 grp-01-10-01 dovecot: Dovecot v1.0.rc7 starting up
Oct 30 20:12:04 grp-01-10-01 dovecot: auth(default): passwd-file
/etc/dovecot.de
ny: Read 0 users
Oct 30 20:12:04 grp-01-10-01 dovecot: auth(default): passwd-file
/etc/imap.passw
d: Read 1 users
Oct 30 20:12:24 grp-01-10-01 dovecot: auth(default): client in: AUTH 1
PLAIN service=IMAP secured lip=::ffff:127.0.0.1 rip=::ffff:127.0.0.1
resp=AHR1c2VyAHBhc3MOct 30 20:12:24 grp-01-10-01 dovecot: auth(default):
passwd-file(tuser,::ffff:12
7.0.0.1): unknown user
Oct 30 20:12:24 grp-01-10-01 dovecot: auth(default): client out: OK 1
user=tuser
Oct 30 20:12:24 grp-01-10-01 dovecot: auth(default): master in: REQUEST 1
30764 1
Oct 30 20:12:24 grp-01-10-01 dovecot: auth(default):
passwd(tuser,::ffff:127.0.0
.1): unknown user
Oct 30 20:12:24 grp-01-10-01 dovecot: auth(default):
userdb(tuser,::ffff:127.0.0
.1): user not found from userdb
Oct 30 20:12:24 grp-01-10-01 dovecot: auth(default): master out: NOTFOUND
1
Oct 30 20:12:24 grp-01-10-01 dovecot: imap-login: Internal login failure:
user=<
tuser>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
~
============================================================================
Followup:
The auth is working for system users but not for virtual users. I have
put the virtual user, tuser, in the file /etc/imap.passwd in /etc/passwd
format using the example. But I can never login with this user.
Here is /etc/imap.passwd:
tuser:{PLAIN}pass:65534:65534::/var/mail/u/tuser
Other questions:
When I logged in the first time with system user, greno, it created the
following tree under /var/mail:
./r/greno/Maildir/new
./r/greno/Maildir/cur
./r/greno/Maildir/tmp
This is great except that the top level directory, 'r', is owned by
this
user alone with very tight permissions. What will happen with next user
with last name beginning with 'r'?
drwx------ 3 greno greno 4096 Oct 30 21:11 r
Is there a way in dovecot.conf to make this owned by dovecot or root and
more open permissions?
Or should I create whole alphabet directories,
'a','b','c'..., and assign
them to dovecot owner?