nametrans to add a dot in the beginning of the foldername

Niklaas Baudet von Gersdorff niklaas at kulturflatrate.net
Fri Oct 3 06:32:33 BST 2014


Aaron Schrab <aaron <at> schrab.com> writes:

> ######## From .offlineimaprc
> [general]
> pythonfile = ~/.offlineimap.py
> 
> [Repository atsRemote]
> nametrans = imap_nametrans_qqx
> 
> ######## .offlineimap.py
> def imap_nametrans_qqx( foldername ):
>   if foldername == 'INBOX':
>     return '.'
>   else:
>     return '.' + foldername

Because I also want to achieve that every folder is saved with a dot at the
beginning, I am using the same configuration. Unfortunately, newly created
folders are not uploaded to the server. On the following page 

   
http://docs.offlineimap.org/en/latest/nametrans.html#where-to-put-nametrans-rules-on-the-remote-and-or-local-repository

it is said that it is also important to have a nametrans for uploading.
Otherwise offlineimap would not upload newly created folder. Hence, I added
the following lines

def dovecot_nametrans_local ( foldername ):
    if foldername == '.' :
        return 'INBOX'
    else :
        return foldername

and also added

nametrans = dovecot_nametrans_local

under the definition of my local repository. Nevertheless, a newly created
folder is not uploaded.

Does anybody know how to solve this issue? Any help is appreciated.






More information about the OfflineIMAP-project mailing list