Deleting messages
Sebastian Spaeth
Sebastian at SSpaeth.de
Mon Sep 5 15:51:03 BST 2011
On Sat, 3 Sep 2011 16:30:50 +0200, François Serman <aifsair at gmail.com> wrote:
> I've been looking at how to enable directory deletion in offlineimap, but I've seen that a small part of the code is commented (basically, the part where the diff between the local and the remote folders and the call to deletefolder).
>
> My question is: why? Is that because it is not implemented on all backends, or is there an other reason?
Because it is not trivial and requires some more changes. And it's
dangerous if done wrong.
a) If you detect different folder structures on the REMOTE and LOCAL
side, we can currently not reliably say if it is because a REMOTE folder
has been created or a LOCAL folder has been deleted.
b) You can "filter out" folders and OfflineImap simply thinks they won't
be there during synchronization. It would currently attempt to delete
all filtered folders on the other side. I often invoke offlineimap with
-f "INBOX" to only sync the inbox. If you implement the commented out
stub (which has been there for years), it would simply delete all other
folders :-).
c) You can transpose names via the nametrans setting. However, these
name translations are often unidirectional. If you have a nametrans=
lambda f: re.sub('^GMX.', '', f) setting, you have now way of knowing
which folder should be deleted on the remote side when a local folder is
deleted.
We are slowly working on expanding support to create folders on the
remote AND the remote side, and once that is in place, we'll be in a
better position to think about deleting.
Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110905/4cdd50b9/attachment-0001.sig>
More information about the OfflineIMAP-project
mailing list