[Dovecot] [dovecot] INDEX variable and mbox_snarf plugin
Is there a way to tell the dovecot mbox_snarf plugin to use an alternate location for the index/cache files? It doesn't seem to want to use the INDEX variable. I'm guessing the answer is no because of all the ties in lib-storage/index/mbox/*c to the directory where the file(that is the inbox) lives. The filesystem where I keep the inbox file doesn't have a directory for the user to own. The user only owns the mbox file.
Thanks, Jonathan
Since I didn't get any bytes for this question, I'll pose it a different way.
From http://wiki.dovecot.org/MailLocation#indexfiles :
== Index files
Index files are by default stored under the same directory as mails. With maildir they are stored in the actual maildirs, with mbox they are stored under .imap/ directory. You may want to change the index file location if you're using NFS or if you're setting up shared mailboxes.
You can change the index file location by adding :INDEX=<path> to mail_location. For example:
mail_location = maildir:~/Maildir:INDEX=/var/indexes/%u The index directories are created automatically, but note that it requires that Dovecot has actually access to create the directories. Either make sure that the index root directory (/var/indexes in the above example) is writable to the logged in user, or create the user's directory with proper permissions before the user logs in.
If you really want to, you can also disable the index files completely by appending :INDEX=MEMORY.
How are people setting the INDEX for mbox_snarf if you are using NFS?
I'm guessing I will just be rewriting lib-storage/index/mbox/ to have a choice of directories or creating 2 new files for mbox_snarf that look alot like the mbox driver index code. Was there a reason to not have a variable for index files for mbox_snarf?
Thanks, Jonathan
Sorry for the late reply.
On Thu, 2008-11-06 at 13:39 -0500, Jonathan Siegle wrote:
Is there a way to tell the dovecot mbox_snarf plugin to use an alternate location for the index/cache files? It doesn't seem to want to use the INDEX variable. I'm guessing the answer is no because of all the ties in lib-storage/index/mbox/*c to the directory where the file(that is the inbox) lives. The filesystem where I keep the inbox file doesn't have a directory for the user to own. The user only owns the mbox file.
It's not possible to specify the index location because of how the plugin has been implemented. The best you could easily do by modifying sources is to disable indexes for INBOX. Other than that it would require larger changes, perhaps a full rewrite.
On Jan 15, 2009, at 6:47 PM, Timo Sirainen wrote:
Sorry for the late reply.
On Thu, 2008-11-06 at 13:39 -0500, Jonathan Siegle wrote:
Is there a way to tell the dovecot mbox_snarf plugin to use an
alternate location for the index/cache files? It doesn't seem to want to use
the INDEX variable. I'm guessing the answer is no because of all the
ties in lib-storage/index/mbox/*c to the directory where the file(that is the inbox) lives. The filesystem where I keep the inbox file doesn't have a directory
for the user to own. The user only owns the mbox file.It's not possible to specify the index location because of how the plugin has been implemented. The best you could easily do by modifying sources is to disable indexes for INBOX. Other than that it would require larger changes, perhaps a full rewrite.
That's what I gleaned from the source. For now, I will go forward with
adding another 300k files to the filesystem..
Thanks, Jonathan
participants (2)
-
Jonathan Siegle
-
Timo Sirainen