Troy Engel wrote:
I'm reading the wiki et el. regarding indexes, but can't come up with
a coherent answer to the setup and what will happen. I want to take
the indexes and move them off of NFS (~/Maildir) and place in
/var/spool/dovecot/indexes, but not have to hand create everything
(user homes, mail folders)
So, I create a parent folder /var/spool/dovecot/indexes that has the
appropriate permissions for writing by all users/dovecot. If I then set:
mail_location =
maildir:~/Maildir:INDEX=/ovar/spol/dovecot/indexes/%1u/%u
...will the dovecot daemon(s) automagically create (A) the parent user
folders (i.e. .../indexes/t/tengel/)(1), and (B) the necessary
subfolders for all the child folder indexes? (i.e.
.../tengel/.Lists.Dovecot/)
It will, but beware... all directories will be created as the user's uid
and gid. So, if you use a different uid for each user, you should
manually create the /var/spool/dovecot/indexes/%1u directories first
with the proper ownership and permissions. Otherwise, when
/var/spool/dovecot/indexes/a gets created for user abc, it will be owned
by abc and creation of /var/spool/dovecot/indexes/a/asmith by user
asmith will fail.
If you're using the same uid for everyone, you don't need to worry about
it. On the other hand, if you're really doing just a one character hash,
is there a good reason not to just create the dirs ahead of time? :) I'm
doing a more complex hash, and have different uids, so I had to write a
script to make the directory structure. Just wanted to save you a little
possible time.
Most of the doc info seems to revolve around moving your indexes if
you use mbox, I'm a little fuzzy on what happens with Maildir when you
attempt this.
thanks!
-te
(1) in our setup, initially user's home folders are created on an
admin server -> NFS that is not the mail server, so Dovecot needs to
create the home & index folders on it's own at runtime.
- Re: [Dovecot] Maildir, INDEX, and folders Justin McAleer
-