aboutsummaryrefslogtreecommitdiff
path: root/offlineimap/offlineimap.py
blob: c304ef4f467abc694cb6dbefd09173a42ad52303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import re

def gmail_nametrans(foldername):
    return re.sub('^\[gmail\].', '', 
            re.sub('all_mail', 'archive',
            re.sub('sent_mail', 'sent',
            re.sub('starred', 'flagged',
            re.sub('bin', 'trash',
            re.sub(' ', '_', foldername.lower()))))))

def gmail_folderfilter(foldername):
    return foldername in ('INBOX', '[Gmail]/Starred',
            '[Gmail]/Drafts', '[Gmail]/All Mail')