nametrans not working as expected

Tomasz Żok tomasz.zok at gmail.com
Tue Aug 20 23:25:30 BST 2013


Hi Florian,

my (working) gmail nametranses contain a slash, not a dot between '[Gmail]' and
folder name part. Use '[Gmail]/Gesendet' and it should work fine. 

Also, as a side note, the folder names look strange if they contain unicode
characters. In polish gmail I need to use the following in my nametrans
'[Gmail]/Wys&AUI-ane', where the whole '&AUI-' part inside of the word is
a single polish letter. So probably you should take special care for german
umlauts if you continue to develop further nametrans functions.

Btw. Is there a special reason to access gmail through IMAP remote account type
and not the builtin Gmail type?

Best regards,
Tomasz


On 2013-08-20 at 13:17, Florian Lindner wrote:
> Hello,
> 
> I have this .offlineimaprc
> 
> [general]
> accounts = florian
> 
> [Account florian]
> localrepository = FloLocal
> remoterepository = FloRemote
> 
> [Repository FloLocal]
> type = Maildir
> localfolders = ~/Mail/foo at xgm.de
> 
> [Repository FloRemote]
> type = IMAP
> ssl = yes
> readonly = yes
> remotehost = imap.gmail.com
> remoteuser = foo at xgm.de
> 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")
> '.Sent'
> 
> But shows no effect when used in the configuration file. There is no .Sent
> folder but still  [Gmail].Gesendet
> 
> What's wrong?
> 
> Thanks,
> Florian

> _______________________________________________
> OfflineIMAP-project mailing list
> OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
> 
> OfflineIMAP homepage: http://software.complete.org/offlineimap





More information about the OfflineIMAP-project mailing list