nametrans not working as expected

Florian Lindner mailinglists at
Tue Aug 20 12:17:53 BST 2013


I have this .offlineimaprc

accounts = florian

[Account florian]
localrepository = FloLocal
remoterepository = FloRemote

[Repository FloLocal]
type = Maildir
localfolders = ~/Mail/foo at

[Repository FloRemote]
type = IMAP
ssl = yes
readonly = yes
remotehost =
remoteuser = foo at
remotepass = 123
nametrans = lambda foldername: ("." + foldername).replace(
                               "[Gmail].Gesendet", "Sent")

Remote it a german gmail account.

The nametrans should replace "[Gmail].Gesendet" to ".Sent". It works fine
with a python shell:

>>> a = lambda foldername: ("." + foldername).replace(
...                                 "[Gmail].Gesendet", "Sent")
>>> a("[Gmail].Gesendet")

But shows no effect when used in the configuration file. There is no .Sent
folder but still  [Gmail].Gesendet

What's wrong?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the OfflineIMAP-project mailing list