Bug 484353 - folderfilter for gmail accounts don't work
folderfilter for gmail accounts don't work
Product: Fedora
Classification: Fedora
Component: offlineimap (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Christoph Höger
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-02-06 07:31 EST by Amit Shah
Modified: 2009-06-28 03:42 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-27 09:01:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Amit Shah 2009-02-06 07:31:22 EST
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?
Comment 1 Amit Shah 2009-03-09 09:08:16 EDT
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.
Comment 2 Christoph Höger 2009-06-27 09:01:43 EDT
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.
Comment 3 Amit Shah 2009-06-28 03:42:26 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.