Red Hat Bugzilla – Bug 484353
folderfilter for gmail accounts don't work
Last modified: 2009-06-28 03:42:26 EDT
Description of problem:
I have this line in my folderfilter:
folderfilter = lambda foldername: foldername not in ['[Gmail].Trash', '[Gmail].Spam']
Even with this line in the rc file, the spam and trash folders get synced.
I also tried
folderfilter = lambda foldername: foldername not in ['Trash', 'Spam']
and that doesn't help either.
Note that I'm using the gmail account as a regular imaps account instead of the special 'gmail' account type.
Is this broken or am I doing it wrong?
folderfilter = lambda foldername: not re.search('(Trash|Spam)', foldername)
This seems to work. I'm still wondering why a non-regexp string doesn't work.
Sorry for not answering this for that long time, but bugzilla isn't a tool for support requests ;).
No, really: I guess the folder name would be something like [Gmail]/Trash (according to offlineimaps example conf). That is the mbox name that gets translated to [Gmail].Trash for maildir standards sake.
So I'll close this one.
I'm sorry on two counts: it did seem like a support request when I didn't know if I was doing it wrong or if the code has a bug in it.
Second, I should read the config file more closely.
Thanks a lot.