summaryrefslogtreecommitdiff
path: root/offlineimap/offlineimap.py
diff options
context:
space:
mode:
Diffstat (limited to 'offlineimap/offlineimap.py')
-rw-r--r--offlineimap/offlineimap.py19
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))