diff options
author | root <root@jellyfish> | 2012-08-28 08:13:53 +0200 |
---|---|---|
committer | root <root@jellyfish> | 2012-08-28 08:13:53 +0200 |
commit | cb200d81d694de06fe4a6b0eea164f8b8dfb7f14 (patch) | |
tree | ad2206cbda2ad8b3301e59e70bff32cac0e08ea9 /offlineimap/offlineimap.py | |
parent | 9476656f209150e3d687650e24ef210b14f0d953 (diff) |
Improve skeleton offlineimap user config.
Diffstat (limited to 'offlineimap/offlineimap.py')
-rw-r--r-- | offlineimap/offlineimap.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/offlineimap/offlineimap.py b/offlineimap/offlineimap.py index 6171a65..623a4d9 100644 --- a/offlineimap/offlineimap.py +++ b/offlineimap/offlineimap.py @@ -1,5 +1,16 @@ -# Frequently used mailboxes (the rest is only sync'ed in *_all targets) -inboxes = ['INBOX', 'Drafts', 'Templates', 'Sent', 'Sendt post', 'done'] +import re -# mbox is INBOX showing up double on UW-imap servers... -imapnoise = ['mbox', 'spam', 'Junk', 'Trash'] +# Mailboxes to check often +main = re.compile('^(INBOX.*|Sent.*|Drafts.*|Templates)$') + +# Mailboxes to never check +noise = re.compile('^(Junk.*|Spam|spam|Trash|Deleted.*)$') + +def common( foldername ): + return (main.search(foldername) and not noise.search(foldername)) + +def uncommon( foldername ): + return (not main.search(foldername) and not noise.search(foldername)) + +def most( foldername ): + return (not noise.search(foldername)) |