[Dovecot] Multiple maildirs
vatikiot at iit.demokritos.gr
Thu Oct 16 17:12:01 EEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Timo Sirainen wrote:
> On Thu, 2008-10-16 at 15:18 +0300, Vassilis Vatikiotis wrote:
>>>> What I want to achieve is receive mail in /var/spool/mail, which is
>>>> going to contain 1 Maildir per user, and have /home/%u/Maildir/ to store
>>>> (move) messages from spool location.
>>> So Dovecot should automatically move messages from one maildir to
>>> another when it sees messages there? You could probably do that with
>>> mbox-snarf plugin (it should work with maildir too). See if you can get
>>> it compiled with 1.0.rc15:
>> Actually no, I just want dovecot to be able to access both maildirs of a
>> user, at the same time. So, in my MUA, I'd be able to see 2 locations
>> (folders), 1 at my home directory and 1 under /var/spool.
>> The reason I need to use /var/spool is that this folder is monitored
>> very closely so it make sense to have postfix storing incoming messages
>> there. End users can move msgs, from the spool locatioon, to their
>> personal maildirs as they see fit.
> Can they be different mailboxes then? So /var/spool/mail/%u is INBOX and
> the other mailboxes are in ~/Maildir? That'd be easy:
> mail_location = maildir:~/Maildir:INBOX=/var/spool/mail/%u
Unfortunately no, and this is a Postfix limitation. Postfix has a
hardcoded upper limit for mbox sizes, which is 2GB on 32bit machines,
and some of my users don't bother to offload their mbox. I could tweak
the Postfix source code but I shudder at the thought of recompiling
every time there is a security update...
my current dovecot conf is:
default_mail_env = mbox:~/mail/:INBOX=/var/spool/mail/%u
and I need to preserve the "essence" of this setup i.e. mbox:~/mail/
resides in nfs, in users' home dirs and :INBOX is where postfix stores
incoming emails, in a local disk.
I could have postfix delivering directly in ~/mail/, in maildir format,
but NFS has proved a bit unreliable so far so I'd rather have incoming
mails stored in a local, reliable storage area i.e. var/spool/mail. But
in a maildir format, cause of postfix mbox size limits :D
After "guarranted" mail deliver in /var/spool by postfix, users can opt
to move mails in ~/mail. All in maildir....
Can it be done? Maybe dovecot doesn't support it i.e. multiple maildir
locations per user.
thx for your time
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the dovecot