problem with nametrans
tom at stercus-accidit.com
tom at stercus-accidit.com
Thu May 31 00:45:50 BST 2012
Hello,
I have run into some problems with nametrans. First one involves gmail
and the All Mail folder - I want to have it locally as 'archive' and
translate it properly back to gmail. Here is relevant part of my config:
[Repository gmail_local]
sep = .
nametrans = lambda folder: re.sub('spam', '[Google Mail].Spam',
re.sub('drafts', '[Google Mail].Drafts',
re.sub('sent', '[Google Mail].Sent Mail',
re.sub('bin', '[Google Mail].Bin',
re.sub('archive', '[Google Mail].All Mail',
folder)))))
[Repository gmail_remote]
nametrans = lambda folder: re.sub('.*Spam$', 'spam',
re.sub('.*Drafts$', 'drafts',
re.sub('.*Sent Mail$', 'sent',
re.sub('.*Bin$', 'bin',
re.sub('.*All Mail$', 'archive', folder)))))
With the above config all folders apart from the 'All Mail' are synced
properly both ways - the 'All Mail' is ignored. I tried changing 'All
Mail' to simply 'All' but that didn't solve it. Could someone point me
in the right direction?
My second problem is with my other account - here is the relevant
configuration:
[Repository m_local]
sep = /
nametrans = lambda folder: re.sub('spam', 'INBOX.Junk',
re.sub('drafts', 'INBOX.Drafts',
re.sub('sent', 'INBOX.Sent',
re.sub('lists/offlineimap',
'INBOX.lists.offlineimap',
re.sub('bin', 'INBOX.Trash', folder)))))
[Repository m_remote]
nametrans = lambda folder: re.sub('.*Junk$', 'spam',
re.sub('.*Drafts$', 'drafts',
re.sub('.*Sent$', 'sent',
re.sub('.*lists.offlineimap$',
'lists/offlineimap',
re.sub('.*Trash$', 'bin', folder)))))
Issue concerns 'lists/offlineimap' - it is syncing OK both way but
locally I'm ending up not only with 'lists/offlineimap' but with
'INBOX/lists' as well. Is it possible to somehow skip the creation of
'INBOX/lists' locally?
Thanks!
T.
More information about the OfflineIMAP-project
mailing list