Re: Sync only specific files/folders?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Oct 13, 2006 at 01:34:52AM +0100, Sean Hammond wrote:
> 2. Now add some filters in the config file.
>
> 3. Go into the local imap folders and delete everything, all the
> unwanted stuff that was downloaded last time you ran offlineimap.
>
> 4. Run offlineimap again. The filters work, but oops, instead of
> downloading everything to the local machine, it's deleting everything
> from the remote machine! It's syncing in the wrong direction! Argh!
I very much suspect that you didn't get your filters set up right. If
the filters worked, then it wouldn't have been doing this ;-)
OfflineIMAP is a bidirectional sync. It syncs in both directions. If
there is a "wrong" direction for you, then you want fetchmail, not
OfflineIMAP.
The code at work is in getfolders() in repository/IMAP.py. I can't see
any way that it could be failing here, but by all means please take a
look. If you have found a bug, I want to fix it.
But I think the most likely thing here is that OfflineIMAP is doing
exactly what it is designed to do -- replicate actions taken on one
machine to the other. Saying that this makes it unsafe is like saying
that rm is unsafe because it can lead to data loss. Maybe that's true,
but that's what it is supposed to do.
> In any case, offlineimap looks like a really useful tool to combine
> with mutt, I've been looking for something like this for a while. I
Glad to hear that. That's exactly how I used it.
> it. Just keeping that interesting little feature in mind. I suppose I
> can see what happened, offlineimap has no way of telling whether I
> deleted the files cause I wanted to redownload it again from the
> start, or whether I'd been deleting a bunch of unwanted email and now
I guess I should have read the entire email before starting to reply.
Yes, that's exactly it.
> wanted to sync the changes. Perhaps I should use some sort of
> interactive mode that asks before deleting stuff, if there is one.
There isn't one. In the manpage, under the UID validity section, you
can find instructions for safely removing folders and forcing a re-sync
from scratch.
> I got round it by renaming my Personal account to my Home account,
> then offlineimap started from the beginning again, downloading all the
> email from the remote server, this time with the filters I wrote.
If you want to restart from scratch completely, the simple way is to
delete the local folders and ~/.offlineimap.
-- John
|
|