Moving the on-disk MailDir for offlineimap
Ng Oon-Ee
ngoonee at gmail.com
Mon Nov 9 15:26:16 GMT 2009
Additional information...
2009/11/9 Ng Oon-Ee <ngoonee at gmail.com>:
> Hi all,
>
> I sync my gmail with offlineimap, works peachy. Currently I have my
> maildir in /home/data/Profiles/OfflineIMAP/root, with subfolders etc.
>
> My university finally decided to inform me what servers they were using
> for IMAP (so I can dump Microsoft Exchange), so I will be adding another
> account syncing my work email to a local copy. I plan to
> use /home/data/Profiles/OfflineIMAP/uni as the root, and should have no
> problems setting that up.
>
> My question is, since I"m doing that, I would like to move the root for
> my gmail from ..../root to ..../personal or something of that nature.
> However I'm worried this would result in message loss if I don't handle
> it correctly, so I'd like some advise first.
>
> My 'action plan' would go something like this:-
> a) make sure offlineimap isn't running (I'll just pull the internet
> connection and kill instances)
> b) rename the folder 'root' to 'personal'
> c) modify the following line in my .offlineimaprc
>
> nametrans = lambda foldername: re.sub('^Sent$', 'root/Sent',
> re.sub('^(\[G.*ail\]|INBOX)', 'root', foldername))
>
> to look like this
>
> nametrans = lambda foldername: re.sub('^Sent$', './Sent',
> re.sub('^(\[G.*ail\]|INBOX)', '.', foldername))
>
> d) modify my local repository in .offlineimaprc to point
> to /home/data/Profiles/OfflineIMAP/personal instead
> of /home/data/Profiles/OfflineIMAP as it is now
>
> Would this work? Would I need to delete my .offlineimap cache store? Is
> it 'allowed' for nametrans to use a period `.` to indicate moving the
> INBOX messages to the root of the local repository?
>
>
I've answered one thing at least, using a period `.` is not
permissible. Right now I have localfolders set to
/home/data/Profiles/OfflineIMAP and a nametrans which places
everything inside personal/ .
nametrans = lambda foldername: re.sub('^','personal/',foldername)
However, I still can't seem to find a way to move all 3+ GB of my mail
from 'root' to 'personal' without necessitating a re-download of ALL
my emails. Please advise if this is possible.
More information about the OfflineIMAP-project
mailing list