[Dovecot] recursive mail_location?
Forgive what may be a newby question, but I'm trying to get a new setup working, and there are many different things confusing me.
I'm trying for a gnus + dovecot + mbsync arrangement, with mbsync writing to maildirs, and gnus reading from those dirs with a dovecot invocation. Fairly standard, I think.
I have multiple email accounts I'm trying to sync, all of them gmail. My problem is that mbsync creates one maildir structure for each mailbox in each account. So I end up with:
~/mail ├── acc1 │ ├── INBOX │ │ ├── cur │ │ ├── new │ │ └── tmp │ └── OTHERBOX │ ├── cur │ ├── new │ └── tmp └── acc2 ├── INBOX │ ├── cur │ ├── new │ └── tmp └── OTHERBOX ├── cur ├── new └── tmp
And so on, for many accounts, and many mailboxes.
I believe there's something I can configure in mbsync to collapse this a little, but there's still going to be quite a bit of nesting. Gnus, meanwhile, is meant to invoke dovecot with the "-o mail_location" switch, and as far as I can tell that needs to be pointed at a maildir structure, which means I would need a separate gnus server for each mailbox in each account.
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.
I'm only just getting started and haven't invested myself in any particular setup, so if the answer is "you're doing it all wrong", I would love to hear that.
Thanks! Eric
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
-- Karol Jurak
Karol Jurak karol.jurak@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:
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
Eric Abrahamsen eric@ericabrahamsen.net writes:
Karol Jurak karol.jurak@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:
Hmm, googling further leads me to believe that dovecot and isync/mbsync simply won't work together out of the box, as they keep uid validity in different formats:
http://dovecot.2317879.n4.nabble.com/More-detail-re-dovecot-uidlist-and-uidv...
On 1.6.2013, at 13.24, Eric Abrahamsen eric@ericabrahamsen.net wrote:
Eric Abrahamsen eric@ericabrahamsen.net writes:
Karol Jurak karol.jurak@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:
Hmm, googling further leads me to believe that dovecot and isync/mbsync simply won't work together out of the box, as they keep uid validity in different formats:
http://dovecot.2317879.n4.nabble.com/More-detail-re-dovecot-uidlist-and-uidv...
There is only one format for IMAP UIDVALIDITY. dovecot-uidlist stores the UIDVALIDITY in hex, but it's still visible as a regular base10 integer via IMAP. I don't know about isync, mbsync or gnus.
Timo Sirainen tss@iki.fi writes:
On 1.6.2013, at 13.24, Eric Abrahamsen eric@ericabrahamsen.net wrote:
Eric Abrahamsen eric@ericabrahamsen.net writes:
Karol Jurak karol.jurak@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:
Hmm, googling further leads me to believe that dovecot and isync/mbsync simply won't work together out of the box, as they keep uid validity in different formats:
http://dovecot.2317879.n4.nabble.com/More-detail-re-dovecot-uidlist-and-uidv...
There is only one format for IMAP UIDVALIDITY. dovecot-uidlist stores the UIDVALIDITY in hex, but it's still visible as a regular base10 integer via IMAP. I don't know about isync, mbsync or gnus.
Ah, all right. Perhaps they're just stored in different locations then. At any rate, it looks like it's going to be more work than it's worth to make these work together.
Thanks, Eric
participants (3)
-
Eric Abrahamsen
-
Karol Jurak
-
Timo Sirainen