Hi,
How do I properly strip off folders with nametrans in a
folder hierarchy?
GMail puts Emails in Username/[GMail]/All Mails/
With offlineimap, I wanna get rid of those two folders in
the
hierarchy: /[GMail]/All Mails/
so that cur-new-tmp are placed directly in the
"Username" folder when
using offlineimap.
1. I managed to get rid of [GMail] with nametrans = lambda
foldername:
re.sub('^[GMail]/', '', foldername), but how do I get rid
off the
second folder in the hierarchy (All Mail)?
2. Also, I'm syncing TWO Gmail accounts. when i use the
nametrans-rule
in .offlineimaprc for both accounts, it only strips off
[GMail] on the
first account, not on the 2nd account. What am I doing
wrong?
the relevant sections in my .offlineimaprc look like that:
####################################################
[Account one]
localrepository = Local1
remoterepository = Gmail1
autorefresh = 10
quick = 3
[Repository Local1]
type = Maildir
localfolders =
~/.kde/share/apps/kmail/mail/.inbox.directory/.one.directory
sep = /
[Repository Gmail1]
type = Gmail
remoteuser = one
remotepass = password
folderfilter = lambda foldername: foldername in
['[Gmail]/All Mail']
nametrans = lambda foldername: re.sub ('^[Google Mail]/',
'', foldername)
realdelete = no
[Account two]
localrepository = Local2
remoterepository = Gmail2
autorefresh = 10
quick = 3
[Repository Local2]
type = Maildir
localfolders =
~/.kde/share/apps/kmail/mail/.inbox.directory/.two.directory
sep = /
[Repository Gmail2]
type = Gmail
remoteuser = two
remotepass = password
folderfilter = lambda foldername: foldername in ['[Google
Mail]/All Mail']
nametrans = lambda foldername: re.sub ('^[Google Mail]/',
'', foldername)
realdelete = no
####################################################
Thanks for your help,
Peter
|