[Dovecot] dovecot and unison
I am successfully using dovecot purely as a personal local mail store on my desktop. (There is only one account, and it's only ever accessed by local mail clients on the machine. The point is to have a common store I can use with any client; plus, I prefer dovecot's Mailbox storage to Thunderbird's mboxes.)
Now I'd like if possible, to replicate this setup on my laptop and keep both in sync with unison (http://www.cis.upenn.edu/~bcpierce/unison/), which I am already using to sync much of my home dir about once a day.
I found at least one positive message regarding this topic (http://dovecot.org/list/dovecot/2010-April/048092.html), but I feel I could use some more advice.
Namely, which of the ancillary files should I be syncing (or perhaps deleting before sync)? In addition to the mails themselves I'm seeing:
-rw------- 1 fz 501 13 Apr 1 17:10 dovecot-keywords -rw------- 1 fz 501 2483 Apr 1 17:10 dovecot-uidlist -rw------- 1 fz 501 1040 Mar 29 14:50 dovecot.index -rw------- 1 fz 501 44032 Apr 1 17:10 dovecot.index.cache -rw------- 1 fz 501 9772 Apr 1 17:10 dovecot.index.log
and at the top level (in .local/var/Maildir/):
-rw------- 1 fz 501 8 Apr 1 17:10 dovecot-uidvalidity -r--r--r-- 1 fz 501 0 Apr 1 17:10 dovecot-uidvalidity.4efb323d -rw------- 1 fz 501 3288 Apr 1 17:10 dovecot.mailbox.log -rw------- 1 fz 501 4104 Mar 28 10:53 dovecot.mailbox.log.2 -rw------- 1 fz 501 5114 Apr 1 17:10 subscriptions
In my naive trials I ended up at least once in a situation where Thunderbird would not see some subfolders (even though they were there). That's since fixed but I guess my question is, what's the safe recommended way to not have this happen?
Thanks, FZiegler
Hi --
[Sorry for my private response, instead of public one]
On 03.04.2012, at 01:02, FZiegler wrote:
Now I'd like if possible, to replicate this setup on my laptop and keep both in sync with unison (http://www.cis.upenn.edu/~bcpierce/unison/), which I am already using to sync much of my home dir about once a day.
I found at least one positive message regarding this topic (http://dovecot.org/list/dovecot/2010-April/048092.html), but I feel I could use some more advice.
I used to sync my two server's maildirs for some years, but I moved to dsync mirroring some months ago, and now I'm into using replicator/dsync (see archive of March 2012).
Unsion mirroring is working in general, but sometimes you might realize some duplicates being produced. Not bad, but it happens. I did realize the same with using dsync mirror instead. It's much better with the new replicator/dsync mirroring scheme, but it's not perfect, yet. (Again, see ML archives of the last weeks).
Namely, which of the ancillary files should I be syncing (or perhaps deleting before sync)? In addition to the mails themselves I'm seeing:
-rw------- 1 fz 501 13 Apr 1 17:10 dovecot-keywords -rw------- 1 fz 501 2483 Apr 1 17:10 dovecot-uidlist -rw------- 1 fz 501 1040 Mar 29 14:50 dovecot.index -rw------- 1 fz 501 44032 Apr 1 17:10 dovecot.index.cache -rw------- 1 fz 501 9772 Apr 1 17:10 dovecot.index.log
and at the top level (in .local/var/Maildir/):
-rw------- 1 fz 501 8 Apr 1 17:10 dovecot-uidvalidity -r--r--r-- 1 fz 501 0 Apr 1 17:10 dovecot-uidvalidity.4efb323d -rw------- 1 fz 501 3288 Apr 1 17:10 dovecot.mailbox.log -rw------- 1 fz 501 4104 Mar 28 10:53 dovecot.mailbox.log.2
I used ...
ignore = Name dovecot*
ignore = Regex .*/tmp$
ignore = Regex .*/\.Drafts$
… to ignore all of them. When runnig mirroring for the very first time, I started with one empty maildir at one server, IIRC. You better check that with a test maildir beforehand.
-rw------- 1 fz 501 5114 Apr 1 17:10 subscriptions
That became mirrored.
Regards, Michael
Michael Grimm wrote:
Namely, which of the ancillary files should I be syncing (or perhaps deleting before sync)?
I used ...
ignore = Name dovecot* ignore = Regex .*/tmp$ ignore = Regex .*/\.Drafts$
… to ignore all of them.
Thanks Michael for this (and thanks also mazieres@stanford for your reply). I am now merrily ignoring these files too, and synced 400 MB of mail without seeing the disappearing subfolder issue again.
Francois Z.
At Mon, 02 Apr 2012 19:02:17 -0400, FZiegler wrote:
I am successfully using dovecot purely as a personal local mail store on my desktop. (There is only one account, and it's only ever accessed by local mail clients on the machine. The point is to have a common store I can use with any client; plus, I prefer dovecot's Mailbox storage to Thunderbird's mboxes.)
Now I'd like if possible, to replicate this setup on my laptop and keep both in sync with unison (http://www.cis.upenn.edu/~bcpierce/unison/), which I am already using to sync much of my home dir about once a day.
I found at least one positive message regarding this topic (http://dovecot.org/list/dovecot/2010-April/048092.html), but I feel I could use some more advice.
I have a similar setup, but I use offlineimap instead of unison:
http://offlineimap.org/
It seems to work pretty well. That's not to say that unison wouldn't work as well also. However, offlineimap has the advantage that it doesn't restrict you to a star topology. You can, for instance, since to your laptop at work and from your laptop at home.
Note that offlineimap is slow if you don't use imap at both ends. Therefore, I use it on the local end. A simplified excerpt of my .offlineimaprc looks like this:
========
[general] accounts = DefaultAccount
[Account DefaultAccount] localrepository = MyLocal remoterepository = MyRemote
[Repository MyRemote] type = IMAP preauthtunnel = ssh -qax -oBatchMode=yes -oServerAliveInterval=60 MY-MAIL-SERVER 'exec env CONFIG_FILE=/PATH/TO/PRIVATE/dovecot.conf /usr/lib/dovecot/imap'
[Repository MyLocal] type = IMAP preauthtunnel = CONFIG_FILE=$HOME/etc/dovecot.conf /usr/lib/dovecot/imap
========
Unfortunately, in dovecot 2.1, the full text search no longer seems to work in pre-auth mode, but I don't think that has anything to do with offlineimap. I think maybe dovecot is deprecating pre-auth mode or requires a more complicated setup.
participants (3)
-
dm-list-email-dovecot@scs.stanford.edu
-
FZiegler
-
Michael Grimm