[Dovecot] separate partition for index/uidlist
Hi!
What's a safe place for the separate index and uidlist files? I am planning to configure Quota/FS. Can they reside under dovecot's basedir? Is this a good idea? Does it have any significance where I put those files?
Thanks,
Daniel
On Sun, 2007-03-11 at 18:40 +0100, Daniel wrote:
What's a safe place for the separate index and uidlist files? I am planning to configure Quota/FS. Can they reside under dovecot's basedir? Is this a good idea?
Dovecot's base_dir is usually under /var/run, which some OSes delete at boot. So it's not a very good location for it.
Does it have any significance where I put those files?
No. Some people use eg. /var/indexes.
- March 11. 18:53, Timo Sirainen:
On Sun, 2007-03-11 at 18:40 +0100, Daniel wrote:
What's a safe place for the separate index and uidlist files? I am planning to configure Quota/FS. Can they reside under dovecot's basedir? Is this a good idea?
Dovecot's base_dir is usually under /var/run, which some OSes delete at boot. So it's not a very good location for it.
Does it have any significance where I put those files?
No. Some people use eg. /var/indexes. If I have the mail_chroot config parameter set to some dir in the config file and have the home directories set up with /./ ends in the userdb file, do I have to create the directory which holds the index/uidlist files under that chroot dir? Now it seems dovecot can not find the directory which is outside of the chroot (I thought that dovecot opens the index files before it chroots).
Daniel
On Sun, 2007-03-11 at 19:17 +0100, Daniel wrote:
If I have the mail_chroot config parameter set to some dir in the config file and have the home directories set up with /./ ends in the userdb file, do I have to create the directory which holds the index/uidlist files under that chroot dir? Now it seems dovecot can not find the directory which is outside of the chroot (I thought that dovecot opens the index files before it chroots).
No. Each mailbox has separate index files, so the index files are opened when the mailbox is opened. So there's no way to have index/control outside chroot.
- March 11. 19:39, Timo Sirainen:
On Sun, 2007-03-11 at 19:17 +0100, Daniel wrote:
If I have the mail_chroot config parameter set to some dir in the config file and have the home directories set up with /./ ends in the userdb file, do I have to create the directory which holds the index/uidlist files under that chroot dir? Now it seems dovecot can not find the directory which is outside of the chroot (I thought that dovecot opens the index files before it chroots).
No. Each mailbox has separate index files, so the index files are opened when the mailbox is opened. So there's no way to have index/control outside chroot. So is it correct to state that chroot and Quota/FS does not work simultaneously? The maildirs/mboxes will always be under the chroot directory, so it is impossible to set the directory containing the index/uidlist files in a place without quota, if it has to be under the chroot.
Daniel
On Sun, 2007-03-11 at 20:07 +0100, Daniel wrote:
No. Each mailbox has separate index files, so the index files are opened when the mailbox is opened. So there's no way to have index/control outside chroot. So is it correct to state that chroot and Quota/FS does not work simultaneously? The maildirs/mboxes will always be under the chroot directory, so it is impossible to set the directory containing the index/uidlist files in a place without quota, if it has to be under the chroot.
Normally yes. Although it could be possible to do something tricky, such as temporarily make a mount --bind (assuming you're using Linux) inside the user's home directory for the index/control files. I'm not sure if that's a good idea though. :)
- March 11. 20:12, Timo Sirainen:
On Sun, 2007-03-11 at 20:07 +0100, Daniel wrote:
No. Each mailbox has separate index files, so the index files are opened when the mailbox is opened. So there's no way to have index/control outside chroot.
So is it correct to state that chroot and Quota/FS does not work simultaneously? The maildirs/mboxes will always be under the chroot directory, so it is impossible to set the directory containing the index/uidlist files in a place without quota, if it has to be under the chroot.
Normally yes. Although it could be possible to do something tricky, such as temporarily make a mount --bind (assuming you're using Linux) inside the user's home directory for the index/control files. I'm not sure if that's a good idea though. :)
I like that peculiar idea; I would do that just to see if it works! But fortunatelly I'm running OpenBSD :) So, I must turn off the mail_chroot option, and also strip the trailing /./ from the users' homedirs in the userdb file, right? I know that in the config file you wrote that the chrooting is not really needed, but if there is a tiny hope, I want to take a chance :)
Daniel
participants (2)
-
Daniel
-
Timo Sirainen