[Dovecot] Dovecot LDA, virtual users, multiple uids: No luck
Toni Mueller
support at oeko.net
Sat Sep 18 20:59:02 EEST 2010
Hi,
I'm trying to get Dovecot's deliver to create and use mailboxen with
one uid per user. Reading the wiki, I decided to go with the sudo
attempt, but I'm stuck because deliver fails to create the intermediate
directories. The auth.log has this on the matter:
sudo: dovelda : TTY=unknown ; PWD=/var/spool/postfix ; USER=root ; COMMAND=/usr/lib/dovecot/deliver -f toni at bogus.oeko.net -d dick at example.com
Using strace on 'deliver', I get this:
# su - dovelda
$ echo "blubber" |sudo strace /usr/lib/dovecot/deliver -f toni at bogus.oeko.net -d dick at example.com
...
geteuid() = 0
getgid() = 0
setgid(2000) = 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
setgroups(1, [2000]) = 0
setuid(2100) = 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
setuid(0) = -1 EPERM (Operation not permitted)
getgid() = 2000
getegid() = 2000
setgid(0) = -1 EPERM (Operation not permitted)
close(6) = 0
geteuid() = 2100
geteuid() = 2100
and subsequently, creating the directories fails.
The values in the underlined lines above, 2100 and 2000, are from the
database entry of the user I want to deliver the email to.
My /etc/sudoers has this for dovelda:
dovelda ALL=NOPASSWD:/usr/lib/dovecot/deliver
dovelda ALL=NOPASSWD:/usr/bin/strace
I'm using a Debian/Lenny system with amd64 and this package for
Dovecot:
# dpkg -l 'dovecot*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii dovecot-common 1:1.2.13-1~bpo secure mail server that supports mbox and ma
ii dovecot-imapd 1:1.2.13-1~bpo secure IMAP server that supports mbox and ma
Kind regards,
--Toni++
More information about the dovecot
mailing list