Complete.Org: Mailing Lists: Archives: offlineimap: May 2008:
Copying messages from one offlineimap store to another...
Home

Copying messages from one offlineimap store to another...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Cc: nkinkade@xxxxxxxxxxxxxxxxxxx
Subject: Copying messages from one offlineimap store to another...
From: Asheesh Laroia <asheesh@xxxxxxxxxxx>
Date: Fri, 2 May 2008 13:19:56 -0700 (PDT)

...makes offlineimap act as if the messages originated in the target 
store.

Let me explain with an example:

1. Create a Remote and a Local repository; call the Local repository 
local_one and the Remote remote_one.

2. Synchronize.

3. Create a new Remote and a new Local; call them remote_two and 
local_two respecitively.

4. Synchronize

5. Copy all the emails from local_one into local_two.

6. Synchronize remote_two with local_two.

At this point, what I *expect* to happen is that offlineimap upload all 
the new messages I put in the local_two.  Instead, it tells me it is 
deleting the messages from local_two[INBOX] and LocalStore[INBOX], even 
though nothing is truly stored about these messages in the local_two 
LocalStore - they're new to that account!

I believe this is because offlineimap is trusting the FMD5= and U= notes 
in the filenames.  Since the highest UID for the mailbox is higher than 
the UIDs for these messages (where those UIDs come from a totally separate 
namespace, the remote_one), it thinks they must have existed before, so it 
deletes them.  This strikes me as strange - these files have no entry in 
the LocalStore for that account, so the information in the filenames 
should not be trusted.

I worked around this by doing a mass-rename of local_one's Maildir files 
to remove the FMD5=() and U=() notes in the filenames.  Then offineimap 
treated the new messages as I expected it to.

(The point of this exercise was to use offlineimap in a mail migration 
between two IMAP servers, which (after the workaround) worked great!)

Is this expected behavior?

-- Asheesh.

-- 
bug, n:
        A son of a glitch.



[Prev in Thread] Current Thread [Next in Thread]
  • Copying messages from one offlineimap store to another..., Asheesh Laroia <=