Feature #10

Added by want_more-r-admin-ru - 600 days ago. Updated 60 days ago.

[patch requested] Sync direction

Status :Assigned Start :
Priority :Normal Due date :
Assigned to :John Goerzen % Done :

0%

Category :Sync
Target version :-
Resolution :


Description

Hi there.
Is it possible to use unidirectional sync with OfflineIMAP?
E.g. merging local maildir with remote imap but without uploading local messages on the remote.

History

03/05/2007 08:05 PM - davec -

I would also like to encourage making bi-directional sync optional. I'd rather have two separate configurations for syncing in the different directions. My purpose is to backup my mail store, not access it from multiple places. The reverse sync would be used only if a problem happened on the primary store.

Besides, I'm just not comfortable with bi-directional syncs that include deleted messages. I can't convince myself that it can be done without the possibility of accidents.

02/10/2008 06:02 PM - blujay -

Please do add unidirectional support. I am using offlineimap to backup my Gmail account, but I realized a scenario like the following could conceivably occur:

1. I make a complete backup of my Gmail account.

2. I make a complete backup of my local computer to an external hard drive, EXCLUDING the backed-up Gmail maildir (it's huge, and I don't feel a need to backup my backup).

3. My computer's main drive fails.

4. I replace the main drive and restore from the external hard drive. This restores ~/.offlineimaprc and ~/.offlineimap/, but NOT the Gmail maildir.

5. Later, without realizing what is about to happen, I run offlineimap again. Since the offlineimap CACHE exists, but the MAILDIR does not, offlineimap will think that I want to delete every message that used to be in the maildir, and will proceed to DELETE ALL MAIL from Gmail. (Ok, perhaps in this case, being Gmail, it would not actually delete the mail, but remove all labels, but this would still be a huge pain. And if I was using this technique to back up a normal IMAP account, it WOULD delete all mail.)

I have tried to take precautions against this by excluding ~/.offlineimap from my backups, so it wouldn't be restored in the event I had to restore everything. This still seems risky to me, and it would be much better if offlineimap had a simple one-way sync option.

03/03/2008 08:42 AM - John Goerzen

This is a pretty major thing. I won't have time to write this up myself (at least not for free), but if someone wants to write a well-designed patch, I'll apply it.

03/03/2008 11:24 AM - John Goerzen

  • Status changed from New to Assigned

07/09/2008 06:56 AM - Adam Spiers

+1 from me - I agree that backup/restore is a valid use case for this, but here is another too:

I now use gmail, and get TONS of spam (1000s per day). So clearly I do not want to download all that, and have set up a folderfilter to exclude the [Google Mail]/Spam folder. However, this means that when gmail fails to catch spam and it appears in my INBOX, I cannot mark it as Spam by saving it locally to the Spam folder and then using offlineimap to upload it to the remote Spam folder, because that would require me to include the Spam folder in the sync and then download 1000s of spam I have no interest in. Therefore I can only mark it as spam via the web interface or gmail for mobiles. If I had uni-directional sync (upload only) this would be possible.

Also available in: Atom PDF