Hello,
after finally having managed to setup up dovecot with virtual users and public folders I tried to get it connected to postfix. The problem is, that I can't get postix to deliver mail via dovecot-lda.
After some testing it seems to come down to dovecot-lda behaving different when called as root then when called as user vmail.
Basic setting:
- dovecot 2.1.1
- all mailboxes owned by user vmail (using mail_uid and mail_gid)
Test 1: as user root: /usr/libexec/dovecot/dovecot-lda -d ahelmcke < some_mail
working as expected; some_mail gets stored in users INBOX
Test 2: same command executed as user vmail. dovecot-lda terminates immediately.
syslog-output with mail_debug = yes: Test 1: Apr 19 16:38:04 elablnmail02 dovecot: lda: Debug: auth input: ahelmcke Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: Effective uid=494, gid=491, home=/home/mail/user/ahelmcke Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace inbox: type=private, prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/home/mail/user/ahelmcke Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: maildir++: root=/home/mail/user/ahelmcke, index=, control=, inbox=/home/mail/user/ahelmcke, alt= Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace dummy: type=private, prefix=, sep=/, inbox=no, hidden=yes, list=no, subscriptions=yes location=maildir:/home/mail/user/ahelmcke/public/ Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: maildir++: root=/home/mail/user/ahelmcke/public, index=, control=, inbox=, alt= Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace Allgemeines: type=public, prefix=Allgemeines/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no location=maildir:/home/mail/Allgemeines:INDEX=/home/mail/user/ahelmcke/SEEN.Allgemeines Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: maildir++: root=/home/mail/Allgemeines, index=/home/mail/user/ahelmcke/SEEN.Allgemeines, control=, inbox=, alt= Apr 19 16:38:04 elablnmail02 dovecot: lda(ahelmcke): Debug: none: root=, index=, control=, inbox=, alt= Apr 19 16:51:37 elablnmail02 dovecot: lda(ahelmcke): Debug: Destination address: ahelmcke@elablnmail02.ela-bln.local (source: user@hostname) Apr 19 16:51:37 elablnmail02 dovecot: lda(ahelmcke): msgid=unspecified: saved mail to INBOX
Test 2: Apr 19 16:37:37 elablnmail02 dovecot: lda: Debug: auth input: ahelmcke Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: Effective uid=494, gid=491, home=/home/mail/user/ahelmcke Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace inbox: type=private, prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/home/mail/user/ahelmcke Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: maildir++: root=/home/mail/user/ahelmcke, index=, control=, inbox=/home/mail/user/ahelmcke, alt= Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace dummy: type=private, prefix=, sep=/, inbox=no, hidden=yes, list=no, subscriptions=yes location=maildir:/home/mail/user/ahelmcke/public/ Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: maildir++: root=/home/mail/user/ahelmcke/public, index=, control=, inbox=, alt= Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace : type=private, prefix=, sep=, inbox=no, hidden=no, list=yes, subscriptions=yes location= Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mdbox: access(/home/mail/user/ahelmcke/mdbox, rwx): failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mdbox: couldn't find root dir Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: sdbox: access(/home/mail/user/ahelmcke/sdbox, rwx): failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: sdbox: couldn't find root dir Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: maildir: access(/home/mail/user/ahelmcke/Maildir, rwx): failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: maildir: couldn't find root dir Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mbox autodetect: has .imap/: stat(/home/mail/user/ahelmcke/mail/.imap) failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mbox autodetect: has inbox: stat(/home/mail/user/ahelmcke/mail/inbox) failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mbox autodetect: has mbox: stat(/home/mail/user/ahelmcke/mail/mbox) failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mbox autodetect: has .imap/: stat(/home/mail/user/ahelmcke/Mail/.imap) failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mbox autodetect: has inbox: stat(/home/mail/user/ahelmcke/Mail/inbox) failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mbox autodetect: has mbox: stat(/home/mail/user/ahelmcke/Mail/mbox) failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: mbox: couldn't find root dir Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: sdbox: access(/home/mail/user/ahelmcke/sdbox, rwx): failed: No such file or directory Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Debug: sdbox: couldn't find root dir Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Error: user ahelmcke: Initialization failed: Namespace '': Mail storage autodetection failed with home=/home/mail/user/ahelmcke Apr 19 16:37:37 elablnmail02 dovecot: lda(ahelmcke): Fatal: Invalid user settings. Refer to server log for more information.
doveconf -n
# 2.1.1: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-220.7.1.el6.x86_64 x86_64 CentOS release 6.2 (Final) auth_master_user_separator = * auth_verbose = yes first_valid_uid = 400 mail_debug = yes mail_gid = vmail mail_home = /home/mail/user/%u mail_uid = vmail 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 mbox_write_locks = fcntl namespace Allgemeines { location = maildir:/home/mail/Allgemeines:INDEX=/home/mail/user/%u/SEEN.Allgemeines prefix = Allgemeines/ separator = / subscriptions = no type = public } namespace dummy { alias_for = INBOX/ hidden = yes list = no location = maildir:/home/mail/user/%u/public/ prefix = separator = / type = private } namespace inbox { inbox = yes location = maildir:/home/mail/user/%u prefix = INBOX/ separator = / type = private } passdb { args = /etc/dovecot/passwd.masterusers driver = passwd-file master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap } plugin { acl = vfile sieve = /home/mail/user/%u/sieve.active sieve_dir = /home/mail/user/%u/sieve.scripts sieve_global_dir = /var/lib/dovecot/sieve/global/ sieve_global_path = /var/lib/dovecot/sieve/default.sieve } protocols = imap lmtp sieve service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } unix_listener auth-userdb { mode = 0600 user = vmail } } service imap-login { inet_listener imap { address = * } inet_listener imaps { address = * } } service managesieve-login { inet_listener sieve { address = * port = 4190 } } ssl = required ssl_cert =
Any ideas?
Greetings Andreas