[Dovecot] recursive mail_location?

Eric Abrahamsen eric at ericabrahamsen.net
Fri May 31 03:36:19 EEST 2013


Karol Jurak <karol.jurak at gmail.com> writes:

> On Thursday 30 of May 2013 10:33:01 Eric Abrahamsen wrote:
>> Does anyone have a recommended way of handling this? Is it possible to
>> either "flatten" the structure further, or somehow tell dovecot to
>> recurse into directories? I don't mind having a separate gnus server
>> for each mail account, but I'd hate to have to do one per mailbox.
>
> Maybe setting LAYOUT=fs (and possibly DIRNAME) in mail_location could 
> somehow help you?
>
> More on this settings is here:
>
> http://wiki2.dovecot.org/MailLocation/Maildir

Thanks for this! I've tried a couple of different things now. With the
original mbsync invocation (a top-level ~/.mail, one subdir per account,
another subdir per mailbox), I tried one of these per account, in gnus:

"/usr/lib/dovecot/imap -o mail_location=maildir:$HOME/.mail/acc1/:LAYOUT=fs"

I get this:

.mail
├── acc1
│   ├── cur
│   ├── dovecot.index.log
│   ├── dovecot-uidlist
│   ├── dovecot-uidvalidity
│   ├── dovecot-uidvalidity.51a7e756
│   ├── [Gmail].Drafts
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   ├── [Gmail].Important
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   ├── [Gmail].Sent Mail
│   │   ├── cur
│   │   ├── dovecot.index.cache
│   │   ├── dovecot.index.log
│   │   ├── dovecot-uidlist
│   │   ├── new
│   │   └── tmp
│   ├── Inbox
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   │    (the other usual boxes)
│   ├── new
│   └── tmp
(repeat for other accounts, all exactly the same)

So dovecot makes top-level {cur,new,tmp} directories, but there's
nothing in them. In the mailboxes, only [Gmail].Sent Mail seems to be
properly read. Inside Gnus, only Inbox and [Gmail].Sent Mail are listed
as available boxes, and only Sent Mail actually has mail in it. Inbox
reports as empty (though there are plenty of messages in the "cur"
directory).

Then I tried changing the dovecot invocations to this:

"/usr/lib/dovecot/imap -o mail_location=maildir:$HOME/.mail/:LAYOUT=fs:DIRNAME=acc1"

So each invocation has the same maildir path, but a different account
name in DIRNAME. That got me this:

.mail
├── acc1
│   ├── [Gmail].Drafts
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   ├── [Gmail].Important
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   │    Other boxes
│   └── Inbox
│       ├── cur
│       ├── new
│       └── tmp
├── dovecot.mailbox.log
├── dovecot-uidvalidity
├── dovecot-uidvalidity.51a7eea4
├── acc2
│   ├── [Gmail].Drafts
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   ├── [Gmail].Important
│   │   ├── cur
│   │   ├── new
│   │   └── tmp
│   │    Other boxes
│   └── Inbox
│       ├── cur
│       ├── new
│       └── tmp
├── INBOX
│   ├── acc1
│   │   ├── cur
│   │   ├── dovecot.index.log
│   │   ├── dovecot-uidlist
│   │   ├── new
│   │   └── tmp
│   └── acc2
│       ├── cur
│       ├── dovecot.index.log
│       ├── dovecot-uidlist
│       ├── new
│       └── tmp

Now *only* the INBOX for each account shows up in gnus, but it's still
empty.

Sorry for this monster posting, but I feel like this would all line up
properly with the right tweaks, either in mbsync or dovecot -- I just
don't know how. Any further advice would be much appreciated!

Eric



More information about the dovecot mailing list