Shouldn't the INBOX mailbox be an ".INBOX" directory?
Possibly, but customarily the ~/Maildir/[new|cur|tmp]
are what make up the INBOX.
As with all things you can configure Dovecot differently to match with how you want e-mail messages to be delivered and stored. ~/Maildir/INBOX/[new|cur|tmp]
is completely possble. Beware though that that should match with how your incoming SMTP server (or LDA) is configured to store new e-mail on disk as well....
Folders are an extension to the original Maildir format called Maildir++ as described here. A IMAP folder is implemented as a subdirectory with the naming convention Maildir/.<Folder Name>
and Maildir/.<Folder Name>.<Sub Folder>
.
IMAP folders are also Maildir directories themselves, in the regard that they also contain the cur, new and tmp subdirectories i.e. Maildir/.<Folder Name>/[cur|new|tmp]/
Depending on your needs you can change that to Maildir/<Folder Name>/<Sub folder>
by including the LAYOUT=fs
option in the Dovecot mail_location
configuration setting. Although I don't really see the need as you shouldn't be managing your mail via the file-system anyway.
If I define an explicit private namespace with inbox=yes, and prefix=FOO, what consequences, if any will this have to the folder structure and to the client mailbox display?
On the folder structure on disk, mostly none, that is configured by the mail_location
setting in the namespace and the presence or absence of the layout=FS option.
Creating a namespace with inbox=yes makes that namespace the INBOX. A user can only have a single INBOX. You need to ensure that your incoming mail also get delivered there for that to be useful. An example with two namespace is the classic mbox file being the INBOX and the Maildir holding all IMAP folders in in Maildir format in a users home-directory:
namespace {
separator = /
prefix = "#mbox/"
location = mbox:~/mail:INBOX=/var/spool/mail/%u
inbox = yes
hidden = yes
list = no
}
namespace {
separator = /
prefix =
location = maildir:~/Maildir
}
The prefix is used in the NAMESPACE response from Dovecot and the effect will depend on the IMAP client. See RFC 2342 about the purpose of namespaces.
Essentially I cant figure out what purpose the namespace prefix serves, and if it is used for naming the actual directories in the users Maildir or not.
Dovecot has quite a lot to say about the Namespaces extension to the IMAP protocol as well.
If you want to use maildir format, you need to specify that in your configuration. Try changing:
mail_location = /var/vmail/%d/%n/:INDEX=/var/vmail/%d/%n/indexes
to:
mail_location = maildir:/var/vmail/%d/%n/:INDEX=/var/vmail/%d/%n/indexes
I use procmail with MAILDIR specified as $HOME/Maildir/
. Mail is delivered to $HOME/Maildir/new
with names like 1417748317.25141_1.myhost
. When I pick mail up dovecot move them to $HOME/Maildir/new
and appends :2,
to the filename. When the file is read flags are appended. I don't need to know dovecot's uid to handle the messages. I have procmail filtering mail into other mailboxes, and those are handled well without knowing dovecot's UIDs for that folder.
Best Answer
You say that if you set
pop3_no_flag_updates=yes
that the mail remains in the /new folder, I believe that is by design.One reason is that the original maildir specification states that messages in the new folder cannot have flags. So if it isn't setting a flag, there is no reason for it to move it to /cur (if it isn't doing a part of the work, it won't do any of it I suspect).. For example (from the courier maildir page):
Why it could't move it to cur anyways.. I don't know, but I suspect it may have something to do with the RFCs, you might want to ask Timo