[Dovecot] deliver + quota
Hi list,
can someone please explain me the following behaviour of deliver in combination with fs-quota and reading from stdin:
vs.
su ud_3p5 -s/bin/sh -c "/usr/libexec/dovecot/deliver -p /tmp/mymail -e; echo \$?"
0
Must have something to do with create_raw_stream inside deliver.c
System is running Dovecot v1.2.13
Thanks, / manuel
On Wed, 2010-10-27 at 19:52 +0200, Manuel Mausz wrote:
Yeah. With v1.2 without -p parameter it's first creating a temporary file into the user's home dir, which increases quota. In v2.0 /tmp is again the default, but it's now configurable:
Directory in which LDA/LMTP temporarily stores incoming mails >128 kB.
#mail_temp_dir = /tmp
The reason why it was moved away from /tmp in the first place was because someone complained that their /tmp was too small for it.
On 02.11.2010 16:49, Timo Sirainen wrote:
Hi Timo,
thanks for pointing that new configuration variable out. I've backported your patch to v1.2 and it's working fine now. I guess this temporary file is needed for supporting mbox but why is it needed for maildir?
thanks, / manuel
On Wed, 2010-11-03 at 11:38 +0100, Manuel Mausz wrote:
Yeah. Unfortunately there's a ton of layers that make this difficult to implement. There are 3 different cases:
- No sieve -> it should be possible to just call mailbox_save() with the stdin input stream directly. I implemented this now to lda: http://hg.dovecot.org/dovecot-2.0/rev/b9487d271b72 http://hg.dovecot.org/dovecot-2.0/rev/fd44ba1fa729
Doing the same for LMTP would require more code.
With Sieve, but it either doesn't read message at all or reads less than the first 128 kB of it -> again there's no need to seek backwards (no need for temp file), so mailbox_save() should get an input stream that gets the already read data followed by not yet read stdio input stream. But that gets annoyingly difficult to implement.
With Sieve that read more than 128 kB of input -> temp file needs to be created. Yeah, it should be possible to hard link it into the final maildir message. It needs to have the correct file permissions set up (destination could be a shared mailbox), which gets a bit annoying to implement. Also the temp file needs to exist for the entire duration of the mail delivery, so if it crashes it leaves the temp file lying around (now the temp file is unlinked immediately after creation).
participants (2)
-
Manuel Mausz
-
Timo Sirainen