[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sup-devel] A maildir root source: syncing labels with maildirs (imap folders)
I've installed the branch and am trying it out. So far it looks good, but there have been a few oddities...
I'm running with a standard IMAP account (not Gmail). The root looks like
[steve@indy ~]$ ls -l .mail
total 0
drwx------ 5 steve staff 170 Nov 19 13:44 Archive
drwx------ 5 steve staff 170 Nov 22 12:31 INBOX
drwx------ 5 steve staff 170 Nov 19 13:44 drafts
drwx------ 5 steve staff 170 Nov 19 13:44 econpapers
drwx------ 5 steve staff 170 Nov 19 13:44 sent
drwx------ 5 steve staff 170 Nov 19 13:44 spam
drwx------ 5 steve staff 170 Nov 25 19:25 trash
and my sources are configured as follows
[steve@indy ~]$ more .sup/sources.yaml
---
- !supmua.org,2006-10-01/Redwood/MaildirRoot
uri: maildirroot:///Users/steve/.mail
usual: true
archived: false
id: 1
labels: []
sync_back: true
confirm_enable_experimental: true
maildir_creation_allowed: true
inbox_folder: INBOX
sent_folder: sent
drafts_folder: drafts
spam_folder: spam
trash_folder: trash
archive_folder: Archive
- !supmua.org,2006-10-01/Redwood/SentLoader{}
I had around 40k messages in the Archive folder and ~20 in the INBOX. After sup-sync, around 10k of the messages in Archive were moved into sup's inbox with labels 'INBOX' and 'Inbox'. They were also (incorrectly) marked as unread.
I'll keep experimenting. Thanks for your effort -- I think this is a great new feature and would really like to see it merged into the mainline someday.
Steve
> Hi,
>
> I have attached my relevant configs (and hopefully managed to anonymize
> them enough). As you can see I use the 'utf7.py' module (placed in
> ~/.offlineimap/) to decode/encode between imap4-utf-7 and utf-8 on
> system (if your filesystem uses a different encoding you might have
> issues). Please don't use the configs verbatim, but rather as
> inspiration: I might have cut out important parts. Some of this is
> in the wiki.
>
> Some of the folders are translated (bi-directional of course) in my
> offlineimaprc, but if you check out my sources.yaml you will see that I
> have specified which folders are related to special (deleted, starred,
> inbox, etc) for some of the sources.
>
> My translation setup in offlineimaprc for my first GMail account
> corresponds to the default values the maildirroot source suggests. The
> only relevant change in config.yaml is to set sync_back_to_maildir:
> true.
>
> The way I set up sup with maildirroot is:
> $ sup-config
>
> fill in, don't add any sources. If you have a working config.yaml, you
> can use it.
>
> add sources:
> $ sup-add maildirroot:///home/gaute/.mail/imap_account
>
> I edit ~/.sup/sources.yaml and enable:
> - confirm_enable_experimental: true
> - sync_back: true
> - maildir_creation_allowed: true
>
> and tweak the folder names if necessary.
>
> Then if your index is empty (you _cannot_ merge an existing maildir
> source by using the same source id) - I run sup-sync:
> $ sup-sync -v
>
> Note that sup-sync does not support the :updated flag (when a message
> has moved on disk), for that you have to run regular Sup and do a poll.
> sup-sync scans through and adds labels; you can also just start up sup
> and see what happens, but that takes a longer time: you probably do not
> need to enable the stuff in sources.yaml before after sup-sync if you
> are nervous (I would be!).
>
> Some annoying issues:
> - deleting a maildir is hard:
> * if you delete it remotely it will be recreated by offlineimap (i
> think)
> * you have to first remove all emails remotely, sync sup, to make sure
> labels are removed.
> * if you remove all messages from a label the maildir will be empty,
> to delete the maildir: sync, delete the maildir locally + delete it
> remotely; then re-sync.
>
> this is the behaviour of offlineimap, but I think it is hard to do
> it differently. this means that if you accidentally add a bogus
> label, it is a bit of a pain to get rid of the maildir.
>
>
> - if a message is deleted from the inbox remotely (archived) it is not
> removed from the inbox view (or any thread index view it is visible
> in) before sup is restarted.
>
> To test maildirroot:
> checkout my branch; make the gem: $ rake gem and install it: $ gem
> install pkg/sup-999.gem. If develop has changed you can try to merge it in
> first.
>
> Again; please make a backup copy of your .mail so that you can restore
> it if it turns out maildirroot has been eating or multiplying emails :)
>
> I probably don't have the time to difficult bugs, but I would be happy
> to accept patches and I could also put this branch on official Sup if it
> turns out to be worth something.
>
>
> Cheers, Gaute
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel