Complete.Org: Mailing Lists: Archives: offlineimap: September 2003:
Re: 4.0 backwards incompatibility
Home

Re: 4.0 backwards incompatibility

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Chris Armstrong <radix@xxxxxxxxxxxxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: 4.0 backwards incompatibility
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Mon, 29 Sep 2003 08:33:17 -0500

There are no plans for a script.  However, the data is actually stored in
the same format.  The paths have just changed due to the more flexible
account/repository system.

I don't have a 3.x installation handy, but if you poke around in your
.offlineimap directory, you should be able to modify things so that the
layout matches the new version.  (MAKE A BACKUP FIRST!)

In 4.x, the layout is:

Repository-REPOSITORYNAME/       [ for remote repoisotires ]
  FolderValidity/                [ same as 3.x; files use remote folder names ]
  UIDMapping/                    [ empty ]

Repository-REPOSITORYNAME/       [ for local repositories ]
  FolderValidity/                [ filenames corresponding to local folder
                                   names -- see below for more ]
  UIDMapping/                    [ empty unless doing IMAP-IMAP sync ]

Account-ACCOUNTNAME/
  LocalStatus/                   [ same as 3.x if memory serves;
                                   filenames use local folder names ]

[ caps indicates replacable text; actual capitalization is as in
  ~/.offlineimaprc ] 

The actual mail messages are stored the same way so you have no need to make
changes there.

Here's some explanation on the above.  In 3.x, you defined a single account
which held information about both the local and remote endpoints of the
communication, and assumed local was always Maildir and remote was always
IMAP.  In 4.x, you define an account, which essentially contains a pointer
to two repositories -- one remote and one local.  This allows IMAP-IMAP
syncing.

To accomplish this well, the directory structure had to change to accomodate
it well.

The old FolderValidity data for the IMAP server should move over with no
problems, as well as the LocalStatus area.  In 4.x, there are two new areas:
a FolderValidity for the local endpoint, and UIDMapping directories.  You
can just create empty UIDMapping directories, since you won't be using that. 
(3.x didn't support that feature.)

That leaves the FolderValidity for the local endpoint.  These corresond to
the names of local folders, and when you're using Maildirs locally, each
file contains the single line:

42

That is, the literal contents of the file are "42\n".  (The FolderValidity
is there in the case that the local endpoint is also IMAP.)  So just create
files with names corresponding to your folders and slap 42 in them. 
[There's got to be some irony there!]

As a special note: if you have a folder named ".", the corresponding file is
named "dot".  (This is the case for some people doing transforms on Courier
IMAP names.)

The good news is that 4.x is the first version of OfflineIMAP that has
introduced any incompatible changes, and there are no plans to do this
again.  I decided to do it all at once to get the pain done with :-)

5.x is being rewritten to use Twisted, and as such has many internal
changes, but will have few user-visible changes.  (I suspect you'll be quite
interested in that project)

-- John

On Sun, Sep 28, 2003 at 02:22:06AM -0400, Chris Armstrong wrote:
> I just upgraded my Debian Unstable machine to offlineimap 4.0, and noticed
> that it was incompatible with my "old" mail directories. Is there _no_ way I
> can avoid having to re-download all of my mail? I'm on a slow link and have
> a ton of mail, and really don't want to do this. Of course I don't mind the
> config file changes. Are there any plans for a script, or something, that
> converts whatever it needs to convert so that I don't have to re-download
> all of my mail?
> 
> Thanks,
> 
> -- 
>  Twisted | Christopher Armstrong: International Man of Twistery
>   Radix  |          Release Manager,  Twisted Project
> ---------+     http://twistedmatrix.com/users/radix.twistd/
> 


[Prev in Thread] Current Thread [Next in Thread]