Moving the on-disk MailDir for offlineimap
ngoonee at gmail.com
Mon Nov 9 02:12:18 GMT 2009
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?
More information about the OfflineIMAP-project