nametrans to add a dot in the beginning of the foldername

Nicolas Sebrecht nicolas.s-dev at laposte.net
Fri Oct 3 16:32:50 UTC 2014


On Fri, Oct 03, 2014 at 12:51:43PM +0200, Rainer M Krug wrote:
> Niklaas Baudet von Gersdorff <niklaas at kulturflatrate.net> writes:
> 
> > 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
> 
> I am doing something similar, only that I add a prefix for each
> account. 

I didn't check the code but ASAIR there is additional code to handle
some corner cases about that dot alone as foldername. Expressed
differently, dots alone and other patterns are not processed the exact
same way in OfflineIMAP.  I wouldn't be surprised there is a hurting bug
out there when nametrans are used.

The prefix workaround is a good thing IMHO. Keep in mind that weird
issues about dots required dedicated fixes in the code.

-- 
Nicolas Sebrecht



More information about the OfflineIMAP-project mailing list