I've had exactly the same problem. My home folder was a separate directory under /home/vmail/%d/%n . The mails were in /srv/mail/%d/%n and i had exactly the same behavior . The error went away when i moved the home folders under /srv/homes/%d/%n. The weird thing is that if the user had sieve scripts ( created by Ingo ) the home folders did exist and everything was fine for that account. However if a user didn't have a home folder created before a delivery of such email it would fail. I guess it was some permission issue, but :
r...@mail:/usr/src/dovecot-1.2.2# ls -lha / | grep vmail drwxrwxrwx 8 root vmail 4.0K 2009-07-13 02:16 home drwxrwxrwx 5 vmail vmail 4.0K 2009-06-15 10:41 srv r...@mail:/usr/src/dovecot-1.2.2# ls -lha /home | grep vmail drwxrwxrwx 8 root vmail 4.0K 2009-07-13 02:16 . drwxrwxrwx 6 vmail vmail 4.0K 2009-07-08 17:34 vmail r...@mail:/usr/src/dovecot-1.2.2# You can see the difference, but i didn't want to change the ownership of /home to vmail user. Not sure what i did wrong or what i did right after that but that's how i fixed it. On Mon, 2009-08-03 at 01:03 +0200, Sven Strickroth wrote: > Hi, > > Im' using deliver with postfix (mailbox_command = > /usr/lib/dovecot/deliver -n -m "$EXTENSION"). > > In dovecot.conf I've set mail_location to > maildir:/var/spool/imap/users/%u/Maildir > > It works, but not for ONE "special" email. > > If I send mail to e.g. t...@trg-oha.de it gets correctly delivered (see > noerror.txt), but I have one mail with an attachment (i cannot provide > it because of privacy reasons) where i get the attached error. > > How comes that deliver doesn't use the mail_location but the real > home-directory (from ldap, it doesn't exist on the mailserver) of that > user in this case? > > plain text document attachment (error.txt) > Aug 3 00:57:40 mailsrv postfix/qmgr[15624]: 4C8582024C: from=<k...@gmx.de>, > size=1436493, nrcpt=1 (queue active) > Aug 3 00:57:40 mailsrv dovecot: deliver(th): Home dir not found: > /home/daten/user/lehrer/th > Aug 3 00:57:40 mailsrv dovecot: deliver(th): Namespace: type=private, > prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes > Aug 3 00:57:40 mailsrv dovecot: deliver(th): maildir: > data=/var/spool/imap/users/th/Maildir > Aug 3 00:57:40 mailsrv dovecot: deliver(th): maildir++: > root=/var/spool/imap/users/th/Maildir, index=, control=, > inbox=/var/spool/imap/users/th/Maildir > Aug 3 00:57:40 mailsrv dovecot: deliver(th): Namespace: type=shared, > prefix=users.%n., sep=., inbox=no, hidden=no, list=(null), subscriptions=no > Aug 3 00:57:40 mailsrv dovecot: deliver(th): shared: root=, index=, > control=, inbox= > Aug 3 00:57:40 mailsrv dovecot: deliver(th): Namespace: type=public, > prefix=shared., sep=., inbox=no, hidden=no, list=(null), subscriptions=no > Aug 3 00:57:40 mailsrv dovecot: deliver(th): maildir: > data=/var/spool/imap/shared > Aug 3 00:57:40 mailsrv dovecot: deliver(th): maildir++: > root=/var/spool/imap/shared, index=, control=, inbox= > Aug 3 00:57:40 mailsrv dovecot: deliver(th): Namespace : Using permissions > from /var/spool/imap/users/th/Maildir: mode=0700 gid=-1 > Aug 3 00:57:40 mailsrv dovecot: deliver(th): > mkdir_parents_chown(/home/daten/user/lehrer/th) failed: Permission denied > (euid=2684(th) egid=12(mail) missing +w perm: /home) > Aug 3 00:57:40 mailsrv dovecot: deliver(th): copy: i_stream_read() failed: > Permission denied > Aug 3 00:57:40 mailsrv dovecot: deliver(th): > msgid=<f915deb780cd459a93fa6a3e9b456...@eeeth>: save failed to INBOX: > Internal error occurred. Refer to server log for more information. > [2009-08-03 00:57:40] > Aug 3 00:57:40 mailsrv postfix/local[16289]: 4C8582024C: > to=<t...@trg-oha.de>, relay=local, delay=45169, delays=45169/0.05/0/0.13, > dsn=4.3.0, status=deferred (temporary failure) > plain text document attachment (noerror.txt) > Aug 3 00:59:44 mailsrv dovecot: deliver(th): Home dir not found: > /home/daten/user/lehrer/th > Aug 3 00:59:44 mailsrv dovecot: deliver(th): Namespace: type=private, > prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes > Aug 3 00:59:44 mailsrv dovecot: deliver(th): maildir: > data=/var/spool/imap/users/th/Maildir > Aug 3 00:59:44 mailsrv dovecot: deliver(th): maildir++: > root=/var/spool/imap/users/th/Maildir, index=, control=, > inbox=/var/spool/imap/users/th/Maildir > Aug 3 00:59:44 mailsrv dovecot: deliver(th): Namespace: type=shared, > prefix=users.%n., sep=., inbox=no, hidden=no, list=(null), subscriptions=no > Aug 3 00:59:44 mailsrv dovecot: deliver(th): shared: root=, index=, > control=, inbox= > Aug 3 00:59:44 mailsrv dovecot: deliver(th): Namespace: type=public, > prefix=shared., sep=., inbox=no, hidden=no, list=(null), subscriptions=no > Aug 3 00:59:44 mailsrv dovecot: deliver(th): maildir: > data=/var/spool/imap/shared > Aug 3 00:59:44 mailsrv dovecot: deliver(th): maildir++: > root=/var/spool/imap/shared, index=, control=, inbox= > Aug 3 00:59:44 mailsrv dovecot: deliver(th): Namespace : Using permissions > from /var/spool/imap/users/th/Maildir: mode=0700 gid=-1 > Aug 3 00:59:44 mailsrv dovecot: deliver(th): > msgid=<4a761b5f.1450...@tu-clausthal.de>: saved mail to INBOX > Aug 3 00:59:44 mailsrv postfix/local[16374]: 78E2D20250: > to=<t...@trg-oha.de>, relay=local, delay=0.07, delays=0.01/0.01/0/0.05, > dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver -n -m > "$EXTENSION") > Aug 3 00:59:44 mailsrv postfix/qmgr[15624]: 78E2D20250: removed