From: Gaute Hope <eg@gaute.vetsj.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: A maildir root source: syncing labels with maildirs (imap folders)
Date: Mon, 25 Nov 2013 16:24:58 +0100 [thread overview]
Message-ID: <1385392376-sup-8491@qwerzila> (raw)
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
Hi fellow suppers,
for a while I have been using a 'maildir-root' source that I created.
It is based on the maildir-syncback code, but goes further: you only
specify a root folder with maildirs to the source, then each sub folder
(maildirsub) is mapped to a label. Some of the labels are special: like
deleted, inbox and archive (the special-label to maildirsub mapping can
be specified in the source configuration).
This means that a sup label corresponds to maildir inside the
maildir-root and the behavior works like this:
- (remote to local) if a message is found in a maildirsub that label is added to it.
- (remote to local) if a message is removed from a maildirsub that
label is removed (unless it has just been moved).
- (local to remote) if you add a label the message is written to that
maildirsub (of all the maildir-roots the message belongs to)
- (local to remote) if you remove a label from a message the message is deleted
from that maildirsub. if it is deleted from all maildirsubs it is
copied to the archive maildirsub.
- (local to remote) if you archive a message it is removed from the
inbox maildirsub, if it doesn't belong to any other
labels/maildirsubs it is copied to archive.
- (local to remote / remote to local) the same flag features as
maildir-syncback (done on all copies in all maildirsubs)
- (local to remote) if you add a label to a message and the message
belongs to a maildir-root where no corresponding maildirsub exists a
maildir will be created for it.
I have been using it for 4-5 months now and it is getting fairly stable.
It works fairly well on gmail (label sync), but I am also using it on
regular IMAP servers (here it might, in the future, be useful to always keep a copy in
archive).
If you are interested in trying this please have a look at:
https://github.com/gauteh/sup/blob/maildir-root/lib/sup/maildirroot.rb
or my branch: https://github.com/gauteh/sup/tree/maildir-root, but please
be careful.
I am using this with offlineimap and utf-7-imap to utf-8 conversion. It
is probably necessary to do a full sync every time to make sure things
stay in sync. Remember that it is technically possible to still do
changes to the maildir while offlineimap is syncing, I haven't had any
problems with this (except read flag), but it is potentially a little
careless.
Cheers, Gaute
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2013-11-25 15:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 15:24 Gaute Hope [this message]
2013-11-25 18:23 ` [sup-devel] " Steven Schmeiser
2013-11-25 21:08 ` Matthieu Rakotojaona
2013-11-25 21:51 ` Gaute Hope
2013-11-25 22:28 ` Gaute Hope
2013-11-26 14:43 ` [sup-devel] " Steven Schmeiser
2013-11-26 15:14 ` Gaute Hope
2013-11-26 16:42 ` Steven Schmeiser
2013-11-26 16:55 ` Gaute Hope
2013-11-27 0:48 ` Steven Schmeiser
2013-11-27 6:21 ` Gaute Hope
2013-11-27 12:42 ` Steven Schmeiser
2013-11-27 13:08 ` Gaute Hope
2013-11-27 13:24 ` Gaute Hope
2013-11-27 18:32 ` Matthieu Rakotojaona
2013-11-27 21:10 ` Gaute Hope
2013-11-29 9:22 ` Gaute Hope
2013-11-27 6:23 ` Gaute Hope
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385392376-sup-8491@qwerzila \
--to=eg@gaute.vetsj.com \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox