Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* A maildir root source: syncing labels with maildirs (imap folders)
@ 2013-11-25 15:24 Gaute Hope
  2013-11-25 18:23 ` [sup-devel] " Steven Schmeiser
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Gaute Hope @ 2013-11-25 15:24 UTC (permalink / raw)
  To: sup-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-11-29  9:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25 15:24 A maildir root source: syncing labels with maildirs (imap folders) Gaute Hope
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox