[Dovecot] deliver is curious
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. th@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?
-- Best regards, Sven mailto:sven@clamav.net ClamAV, a GPL anti-virus toolkit http://www.clamav.net
Aug 3 00:57:40 mailsrv postfix/qmgr[15624]: 4C8582024C: from=kt@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=F915DEB780CD459A93FA6A3E9B4564BA@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=th@trg-oha.de, relay=local, delay=45169, delays=45169/0.05/0/0.13, dsn=4.3.0, status=deferred (temporary failure)
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.1450503@tu-clausthal.de: saved mail to INBOX Aug 3 00:59:44 mailsrv postfix/local[16374]: 78E2D20250: to=th@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
On Mon, 2009-08-03 at 01:03 +0200, Sven Strickroth wrote:
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?
When mail size exceeds 128 kB, it writes a temporary file. If user's home directory is provided, it uses it for creating the temp file.
Aug 3 00:57:40 mailsrv dovecot: deliver(th): Home dir not found: /home/daten/user/lehrer/th
If you don't want Dovecot to use home dirs, don't tell Dovecot about them. Change your userdb to not return home. For example if you're using userdb passwd you can use:
userdb passwd { args = home }
Or since you use Maildir/ in your directory names, probably best to set:
userdb passwd { args = home=/var/spool/imap/users/%u }
Hi,
thanks for your fast response!
Am 03.08.2009 03:27 schrieb Timo Sirainen:
userdb passwd { args = home }
Or since you use Maildir/ in your directory names, probably best to set:
userdb passwd { args = home=/var/spool/imap/users/%u }
Doesn't work for me (exactly the same output).
auth default: passdb: driver: pam args: imap userdb: driver: passwd args: home=/var/spool/imap/users/%u blocking=yes system_groups_user=%n
Why not use mail_location/tmp (in the maildir folder?)
-- Best regards, Sven mailto:sven@clamav.net ClamAV, a GPL anti-virus toolkit http://www.clamav.net
On Aug 3, 2009, at 10:24 AM, Sven Strickroth wrote:
Doesn't work for me (exactly the same output).
auth default: passdb: driver: pam args: imap userdb: driver: passwd args: home=/var/spool/imap/users/%u blocking=yes
system_groups_user=%n
What Dovecot version? What does it log with auth_debug=yes? Does it
work without blocking=yes?
Why not use mail_location/tmp (in the maildir folder?)
It was probably too difficult to implement in a non-maildir specific
way. Although I do remember trying to make it work like that, and
somehow I thought I did. But I guess not.
Am 03.08.2009 17:43 schrieb Timo Sirainen:
Doesn't work for me (exactly the same output).
auth default: passdb: driver: pam args: imap userdb: driver: passwd args: home=/var/spool/imap/users/%u blocking=yes system_groups_user=%n
What Dovecot version? What does it log with auth_debug=yes? Does it work without blocking=yes?
Version: 1.2.2 auth_debug=yes: nothing new (just "auth(default): new auth connection: pid=27091")
I tested with "args: home=/var/spool/imap/users/%u", doesn't help. Is the home-parameter used/ignored in passwd-driver?
-- Best regards, Sven mailto:sven@clamav.net ClamAV, a GPL anti-virus toolkit http://www.clamav.net
On Mon, 2009-08-03 at 17:50 +0200, Sven Strickroth wrote:
Am 03.08.2009 17:43 schrieb Timo Sirainen:
Doesn't work for me (exactly the same output).
auth default: passdb: driver: pam args: imap userdb: driver: passwd args: home=/var/spool/imap/users/%u blocking=yes system_groups_user=%n
What Dovecot version? What does it log with auth_debug=yes? Does it work without blocking=yes?
Version: 1.2.2 auth_debug=yes: nothing new (just "auth(default): new auth connection: pid=27091")
Nothing but that line? Then it's not even doing an auth lookup. You're probably not running deliver with -d parameter?
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 :
root@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 root@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 root@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. th@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=kt@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=F915DEB780CD459A93FA6A3E9B4564BA@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=th@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.1450503@tu-clausthal.de: saved mail to INBOX Aug 3 00:59:44 mailsrv postfix/local[16374]: 78E2D20250: to=th@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
participants (3)
-
Nikolai Bochev
-
Sven Strickroth
-
Timo Sirainen