[Dovecot] dovecot-lda can not find home dir
Hello,
Running dovecot 2.0.11 and pigeonhole on Fedora 14 x86_64. The lda can not seem to find the user's home directory, yet other parts of dovecot (pop3, imap, managesieve) can.
Grepping "Effective uid" from /var/log/maillog: Mar 29 11:21:34 new-eagle dovecot: pop3(pete): Debug: Effective uid=726, gid=726, home=/home/pete Mar 29 11:23:18 new-eagle dovecot: imap(pete): Debug: Effective uid=726, gid=726, home=/home/pete Mar 29 11:23:52 new-eagle dovecot: managesieve(pete): Debug: Effective uid=726, gid=726, home=/home/pete Mar 29 11:24:53 new-eagle dovecot: managesieve(pete): Debug: Effective uid=726, gid=726, home=/home/pete Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: Effective uid=726, gid=726, home=
Although mail does get delivered, the .dovecot.lda-dupes file can not be created because of this: Mar 29 11:26:15 new-eagle dovecot: lda: Debug: Loading modules from directory: /usr/lib64/dovecot Mar 29 11:26:15 new-eagle dovecot: lda: Debug: Module loaded: /usr/lib64/dovecot/lib90_sieve_plugin.so Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: Effective uid=726, gid=726, home= Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: fs: root=/home/pete/mail, index=, control=, inbox=/var/spool/mail/pete Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: userdb lookup skipped, username taken from passwd lookup for process euid Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: none: root=, index=, control=, inbox= Mar 29 11:26:15 new-eagle dovecot: lda(pete): Error: User pete doesn't have home dir set, disabling duplicate database Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: sieve: using sieve path for user's script: /home/pete/.dovecot.sieve Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: sieve: opening script /home/pete/.dovecot.sieve Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: sieve: script /home/pete/.dovecot.sieve successfully compiled Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: sieve: executing script from /home/pete/.dovecot.sieve Mar 29 11:26:15 new-eagle dovecot: lda(pete): sieve: msgid=FF641E3CEA3748B5B7D678ABE85F1A7B@pete1: stored mail into mailbox 'INBOX'
Dovecot seems to be able to determine the user's home directory, but I do not know how to tell dovecot-lda where it is.
Running "doveadm user pete" produces: userdb: pete system_groups_user: pete uid : 726 gid : 726 home : /home/pete
In /home/pete, the .forward file is: | "/usr/libexec/dovecot/dovecot-lda"
Entry from /etc/passwd: pete:x:726:726:Peter:/home/pete:/bin/false
Output of dovecot -n: # 2.0.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.35.11-83.fc14.x86_64 x86_64 Fedora release 14 (Laughlin) ext4 auth_cache_size = 10 M auth_debug = yes auth_mechanisms = login plain auth_verbose = yes disable_plaintext_auth = no listen = * mail_debug = yes mail_location = mbox:/home/%u/mail:INBOX=/var/spool/mail/%u:INDEX=MEMORY 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 mbox_write_locks = fcntl passdb { driver = pam } plugin/sieve = /home/%u/.dovecot.sieve plugin/sieve_dir = /home/%u/sieve protocols = pop3 imap sieve rejection_reason = Sorry, your message was automatically rejected:%n%r rejection_subject = failure notice re: %s service managesieve-login { inet_listener sieve { port = 4190 } } ssl = no userdb { driver = passwd } protocol lda { mail_plugins = sieve
I did update from dovecot-2.0.9 (which the lda could find the home directory) but I also had to change the mail_location from: mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u:INDEX=MEMORY to: mail_location = mbox:/home/%u/mail:INBOX=/var/spool/mail/%u:INDEX=MEMORY
Also had to change: plugin/sieve = ~/.dovecot.sieve plugin/sieve_dir = ~/sieve
To: plugin/sieve = /home/%u/.dovecot.sieve plugin/sieve_dir = /home/%u/sieve
... in order for 2.0.11 to function.
Any thoughts on how to get the home dir passed correctly to lda ?
Thanks, Pete
On 29.3.2011, at 19.32, Pete wrote:
Dovecot seems to be able to determine the user's home directory, but I do not know how to tell dovecot-lda where it is. .. In /home/pete, the .forward file is: | "/usr/libexec/dovecot/dovecot-lda"
You're not giving dovecot-lda the "-d user" parameter, so it's not doing a userdb lookup.
On 29.3.2011, at 19.32, Pete wrote:
Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: userdb lookup skipped, username taken from passwd lookup for process euid
Hmm. Although that should also set home directory even without -d parameter, since it looks it up from passwd.. Wonder why that's not working..
On Wed, Mar 30, 2011 at 10:12 AM, Timo Sirainen tss@iki.fi wrote:
On 29.3.2011, at 19.32, Pete wrote:
Mar 29 11:26:15 new-eagle dovecot: lda(pete): Debug: userdb lookup skipped, username taken from passwd lookup for process euid
Hmm. Although that should also set home directory even without -d parameter, since it looks it up from passwd.. Wonder why that's not working..
Ah ... got me thinking about the .forward file:
In /home/pete, the .forward file is: | "/usr/libexec/dovecot/dovecot-lda"
Adding the -k flag (Don't clear all environment at startup) to dovecot-lda fixes the problem.
Not sure why the environment was cleared though beforehand. Perhaps to do with the addition of the import_environment variable in 2.0.11 ?!?
Anyhow ... problem now looks solved. Thanks for the assistance.
Pete
participants (2)
-
Pete
-
Timo Sirainen