From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost ([128.39.46.106]) by mx.google.com with ESMTPSA id z3sm29950961lag.10.2013.11.25.07.27.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Nov 2013 07:27:05 -0800 (PST) From: Gaute Hope To: sup-devel Subject: A maildir root source: syncing labels with maildirs (imap folders) Date: Mon, 25 Nov 2013 16:24:58 +0100 Message-Id: <1385392376-sup-8491@qwerzila> User-Agent: Sup/git Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1385393099-411546-20776-5221-2-=" --=-1385393099-411546-20776-5221-2-= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 k= eep 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 --=-1385393099-411546-20776-5221-2-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSk2vLAAoJEJgnp+igdJAjfNoP/A9h8OI7yFy+QBHForOzdxIa v/f+wr9RRhMepS9zCkZORqzGErgpGWJfed83H6VkS8HzvnPR1KdFKoU9fZOw9ibE 267q7W8kuwuzYxeFxeR68QZq+a4v2gnrov19J04RzBseQQoJP9yiv5LZiKELTAWf aC3DyOo7CvrudaxZtdf7WeBAAW4iSkYJS9Z9w9ozuz7GIMTfbIuu6/GMGfsH7AtW HX4W8y+zpq99ACaykRM9+GNqEBeMxxC1kUiT1gaK4ByppRkiKzO4CQj4bZp06iqU ok15sjv0iJ+PHfHMerAYP/EAs/s9hCJJz5GR2mXjy5Xlq6YDwp19xbsF2Fkb7JHH h3m/Lw96scLVHB8oIyjPpTGFsCTv8QlTaVRaWi9rFyUx2k92E6kBsLNogNUQbKqa 6E0dp1CiMtlWvN++twYR9LeVQYvhriN1sxJoASoJvw9SxsKK5/89+2JjZS/V+Pxz +aLY4l6DorPxr0kcUKWWEo3wyPEr6dG3m1furr+aLdJ4U/1YEyD7D78GjE0xFmwZ bMDUjR83ALc2yQnQtXfTstFbR5vIFAtBujHwkGvn8bw+GkIeSZFEttdyyslqEGGk jx8obTtQqv7qcLlZQgG/IrY9QKzXKXeOWu5wSoa3biSj89rhX4A2e/egD474ux0O /LabAYlEAh3NNwufVFgN =C0CZ -----END PGP SIGNATURE----- --=-1385393099-411546-20776-5221-2-=--