Jack Bates
2012-Dec-14 14:46 UTC
[Dovecot] BUG: mishandling of username if it's a keyword?
Dec 14 14:33:03 test2 dovecot: auth: Debug: auth client connected
(pid=24143)
Dec 14 14:33:14 test2 dovecot: auth: Debug: client in:
AUTH#0111#011PLAIN#011service=pop3#011secured#011session=D6dl6dDQdAAAAAAAAAAAAAAAAAAAAAAB#011lip=::1#011rip=::1#011lport=110#011rport=38004#011resp=<hidden>
Dec 14 14:33:14 test2 dovecot: auth: Debug:
static(home,::1,<D6dl6dDQdAAAAAAAAAAAAAAAAAAAAAAB>): lookup
Dec 14 14:33:14 test2 dovecot: auth: Debug: client passdb out:
OK#0111#011user=home
Dec 14 14:33:14 test2 dovecot: auth: Debug: master in:
REQUEST#0112033451009#01124143#0111#011243997dcca92c2dc1d1e401c78b4ea4f
Dec 14 14:33:14 test2 dovecot: auth: Debug: master userdb out:
USER#0112033451009#011uid=503#011gid=503#011home=/nfs/maildir/vmail/home#011mail_location=maildir:~/Maildir
Dec 14 14:33:14 test2 dovecot: pop3-login: Login: user=<home>,
method=PLAIN, rip=::1, lip=::1, mpid=24145, secured,
session=<D6dl6dDQdAAAAAAAAAAAAAAAAAAAAAAB>
Dec 14 14:33:14 test2 dovecot: pop3: Debug: Added userdb setting:
mail_location=maildir:~/Maildir
Dec 14 14:33:14 test2 dovecot: pop3(uid=503): Error: user uid=503:
Couldn't drop privileges: User is missing UID (see mail_uid setting)
Dec 14 14:33:14 test2 dovecot: pop3(uid=503): Error: Internal error
occurred. Refer to server log for more information.
compared to:
Dec 14 14:37:25 test2 dovecot: pop3-login: Login: user=<home2>,
method=PLAIN, rip=::1, lip=::1, mpid=24190, secured,
session=<5Zdb+NDQdQAAAAAAAAAAAAAAAAAAAAAB>
Dec 14 14:37:25 test2 dovecot: pop3: Debug: Added userdb setting:
mail_location=maildir:~/Maildir
Dec 14 14:37:25 test2 dovecot: pop3(home2): Debug: Effective uid=503,
gid=503, home=/nfs/maildir/vmail/home2
userdb {
args = uid=vmail gid=vmail home=/nfs/maildir/vmail/%u
mail_location=maildir:~/Maildir
driver = static
}
This was tested on a static passdb/userdb on a test server as well as
production. version 2.1.10. When I have time, I'll dig into it myself
after an upgrade to 2.1.12.
Jack
Jack Bates
2012-Dec-14 16:00 UTC
[Dovecot] BUG: mishandling of username if it's a keyword?
Additional info by switching the home= and uid= settings in the config.
userdb {
args = home=/nfs/maildir/vmail/%u uid=vmail gid=vmail
mail_location=maildir:~/Maildir
driver = static
}
We got the effective id, but then home was unset and the user became the
home setting. lol
Dec 14 15:56:20 test2 dovecot: auth: Debug: master userdb out:
USER#0112586836993#011home=/nfs/maildir/vmail/home#011uid=503#011gid=503#011mail_location=maildir:~/Maildir
Dec 14 15:56:20 test2 dovecot: pop3-login: Login: user=<home>,
method=PLAIN, rip=::1, lip=::1, mpid=24686, secured,
session=<jN2ZEtLQegAAAAAAAAAAAAAAAAAAAAAB>
Dec 14 15:56:20 test2 dovecot: pop3: Debug: Added userdb setting:
mail_location=maildir:~/Maildir
Dec 14 15:56:20 test2 dovecot: pop3(home=/nfs/maildir/vmail/home):
Debug: Effective uid=503, gid=503, homeDec 14 15:56:20 test2 dovecot:
pop3(home=/nfs/maildir/vmail/home):
Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes,
hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir
Dec 14 15:56:20 test2 dovecot: pop3(home=/nfs/maildir/vmail/home):
Error: user home=/nfs/maildir/vmail/home: Initialization failed:
Namespace '': Home directory not set for user. Can't expand ~/ for
mail
root dir in: ~/Maildir
Dec 14 15:56:20 test2 dovecot: pop3(home=/nfs/maildir/vmail/home):
Error: Invalid user settings. Refer to server log for more information.
Jack