[Dovecot] specifying INBOX with maildir for mail_location

Dirk Essl de at floydworld.de
Fri Dec 8 00:03:42 UTC 2006


Post Master wrote:
> I'd like to store all of my mail in maildir, but I want to store the 
> inbox and indices on fast storage and everything else on deep storage. 
> Does the following configuration value for mail_location accomplish this?
> 
> mail_location = 
> maildir:/data/deep/%Ld/mail/%Ln:INBOX=/data/fast/%Ld/mail/%Ln:INDEX=/data/fast/%Ld/indices/%Ln 
> 

I have the following setup:

default_mail_env = 
maildir:/var/maildir/%u/:INBOX=/var/mail/inboxes/%u/:INDEX=/var/mail/indexes/%u/index

/var/maildir is a nfs mounted directory on a filer
/var/mail is local

I'm running rc2, so maybe default_mail_env is now named mail_location

in this case, you don't need a specific namespace setup.

for compatibility reasons for clients which have a 'Imap Directory' 
setting my namespaces ook like this:


namespace private {
   separator = /
   prefix =
   inbox = yes
}

namespace private {
   separator = /
   prefix = ~/MailImap/
   hidden = yes
}

namespace private {
   separator = /
   prefix = /home/%u/MailImap/
   hidden = yes
}

namespace private {
   separator = /
   prefix = ~/mailIMAP/
   hidden = yes
}


> ------------------------------------------------------------------------
> If not, does the following configuration accomplish this with namespaces?
> 
> mail_location = 
> maildir:/data/fast/%Ld/mail/%Ln:INDEX=/data/fast/%Ld/indices/%Ln
> 
> namespace private {
>   separator = /
>   inbox = yes
>   hidden = yes
>   prefix =
>   location =
> }
> 
> namespace private {
>   separator = /
>   hidden = yes
>   prefix = ???
>   location = maildir:/data/deep/%Ld/mail/%Ln/???
> }
> 
> ------------------------------------------------------------------------
> Actually, I can't quite finish the namespace configuration.  I'd like to 
> set something like:
> 
>   prefix = *
>   location = maildir:/data/deep/%Ld/mail/%Ln
> 
> But I suspect the '*' won't actually match everything, and even if it 
> did, I suppose it would also match the inbox.  I began with listing any 
> and every typical folder in its own namespace like:
> 
> namespace private {
>   separator = /
>   hidden = yes
>   prefix = drafts
>   location = maildir:/data/deep/%Ld/mail/%Ln/drafts
> }
> 
> namespace private {
>   separator = /
>   hidden = yes
>   prefix = templates
>   location = maildir:/data/deep/%Ld/mail/%Ln/templates
> }
> 
> namespace private {
>   separator = /
>   hidden = yes
>   prefix = sent
>   location = maildir:/data/deep/%Ld/mail/%Ln/sent
> }
> 
> and so on, but that doesn't seem very elegant.  Also, namespaces scare 
> me for client compatibility.  Am I missing something obvious?
> 

the prefix setting is not for defining which folder is where, prefix 
defines where dovecot will look for mail, if a client has the 'Imap 
Server Directory' set to this value.


regards
dirk


More information about the dovecot mailing list