Bug 484353

Summary: folderfilter for gmail accounts don't work
Product: [Fedora] Fedora Reporter: Amit Shah <amit.shah>
Component: offlineimapAssignee: Christoph Höger <choeger>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: amit.shah, choeger
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-27 13:01:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Amit Shah 2009-02-06 12:31:22 UTC
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 13:08:16 UTC
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 13:01:43 UTC
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 07:42:26 UTC
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.