From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (cC7885BC1.dhcp.as2116.net. [193.91.136.199]) by mx.google.com with ESMTPSA id c10sm43906787lbd.9.2013.11.27.13.12.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Nov 2013 13:12:46 -0800 (PST) From: Gaute Hope To: sup-devel Subject: Re: [sup-devel] A maildir root source: syncing labels with maildirs (imap folders) In-reply-to: <1385576444-sup-3271@kpad> References: <1385392376-sup-8491@qwerzila> <1385415206-sup-5054@qwerzila> <1385476504-sup-9378@indy.local> <1385478548-sup-9110@qwerzila> <2AC33855-6B00-42FB-9F3B-D160D8B556D4@schmeiser.org> <1385484573-sup-869@qwerzila> <1385513221-sup-4344@indy.local> <1385533106-sup-5646@qwerzila> <1385555365-sup-7389@indy.local> <1385557223-sup-3280@qwerzila> <1385576444-sup-3271@kpad> Date: Wed, 27 Nov 2013 22:10:38 +0100 Message-Id: <1385584974-sup-8936@qwerzila> User-Agent: Sup/git Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1385586638-437034-25601-4842-1-=" --=-1385586638-437034-25601-4842-1-= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Excerpts from Matthieu Rakotojaona's message of 2013-11-27 19:32:02 +0100= : > Excerpts from Gaute Hope's message of 2013-11-27 14:08:36 +0100: > > I noticed Gmail does it that way in their IMAP interface (archive on = no > > other labels), thats why I did it. > > _Any_ email in gmail is also in the All Mail [0], except when it is > manually moved to the [Gmail]/Trash folder, in which case it disappears= > forever (well, at least for you :). I think this is the best solution, > because it is the most understandable for all MUAs out there: the fact > that "a maildir is a label" is something pretty specific to > gmail-pioneered MUAs, so at least when I backup the [Gmail]/All Mail I > know I won't have lost any of them (even if I have lost the labels). Hm ok. I just figured it out by trail-and-error, I probably missed something. I have changed sync_back to always make sure the message is present in the archive. This does not have any effect on existing messages before you do some edit that triggers sync_back. It also currently does not check new messages (since non-gmail sources will not have a copy in archive), we should do a check upon :add in poll.rb#do_poll to the source that checks if existing_sources has @archive, if not add and return to poll with updated locations (no sync_back needed and no index sync needed as poll will do that afterwards). About deletion, current behavior: - apply :deleted label; this means: - the message is moved to the trash folder - the T flag is added to all the labels it is part of this might not work exactly as it should on GMail, but it is the only way to preserve labels (in case of restore). > Regarding hardlinking, I'm afraid of the cross-platform issues. I know > some people here use Mac OSX, is it safe to use hardlinking on this > platform ? I am using the util function I created for maildir-sync (in develop) which falls back to copying the file if hardlinking fails, that function works on Mac OS X. Hardlinking doesn't work for me since I am using encfs to store mail. > (Oh and by the way I found a script [1] that basically hardlinks every > copy of an email, this could be especially useful for gmail-based > installations) > > [0] https://support.google.com/mail/answer/78755?hl=3Den > [1] http://jak-linux.org/projects/hardlink/ That could be very useful and run as a cronjob now and then. - gaute --=-1385586638-437034-25601-4842-1-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSll/OAAoJEJgnp+igdJAjsm0P/06H9qUY+vGtxEwCEpDLDlfb mBSWhj6HXS1BaLgrEH0O8Y8k/RGrH7CAv58eV6YH+8DCm8TadkqNl6l1F1BOwFVh Ntn0pdwqVm/VYVxd98cZl1Fvk0Wih7ZRGOKAZ26XZULN0Fuqf0GcUmnYx1987AqI x5UQ+IUTum+1WlCfnrInF1l6MPCVnMDIiRarzU0AxWNZgq08R4sPED4uicJGGKAh odxT3HBhtrfWf5BtWgpjr/0X1T7xdAXu7XQhg0GxsSVRIh1aHEvTM816YB8winNw +JTCO5aeluulZL/hADxAM1xLgo2Fxn1Oc65HTW021wzoITpo9TvB6QLFq6AuLWod 03ulIux6BQJSdN2imC0LyyTxaEUloPZksO6psj932jcqR2v8S6bMQMWr59TmRW4i DVu728VHg+sWs339mfnHeoOjcTY+XeHu2PWGloPrBAE+sDupN3+S6vEFxJdebel5 ofrEHEWddSeGmt4l/Ae7p4mBwjampVAKCWRHmttttgWNWb+TxkmuS87Z8B+big8O CNgcUzZMsZPNlXVuvy9nGC6m5edHBLKQVPHmVIvzK+tVZtVzy6aa5IRXc1Tvg4FV QJ65c67IA/eQYesR8+lX3zyW/8dmFLq6Qy9lVr5w5USa042d9uKwGZayBAXqv3gj 5+jEPfT5cGcCK0VgxgDo =xXcv -----END PGP SIGNATURE----- --=-1385586638-437034-25601-4842-1-=--