Nametrans not translating folder path

Tyson Moore tyson at tyson.me
Sun Sep 23 19:48:03 BST 2012


Hello all,

I've been trying for a couple of days to set up offlineimap to replicate the contents of one IMAP server (read-only) to another IMAP server (read/write). The read-only IMAP server doesn't use a prefix, so the folders are "INBOX", "Drafts" etc. However, the "local" server has a prefix of "INBOX.", requiring nametrans to turn "Drafts" into "INBOX.Drafts" etc. I've posted my full configuration (with passwords redacted, of course) to http://tyson.me/offlineimaprc.txt

My remote server is configured as such (as suggested in the documentation):
[Repository remote]
readonly = True
nametrans = lambda folder: re.sub('^INBOX.', '', folder)

My local server has a matching reverse nametrans rule:
[Repository local]
nametrans = lambda folder: 'INBOX.' + folder

However, when I run offlineimap, it immediately terminates with an error after connecting:

ERROR: Folder 'Tasks'[local] could not be created. Server responded: ('NO', ['Permission denied'])

It seems from this that offlineimap is attempting to create the folder 'Tasks' instead of 'INBOX.Tasks'. I have tried many different permutations of the nametrans expressions, swapping them and removing them, all for naught. Can anybody see a reason why it would be doing this or offer any insight on how to further diagnose the issue?

Cheers,

--Tyson
tyson at tyson.me



More information about the OfflineIMAP-project mailing list