summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcheck_bogofilter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/check_bogofilter.py b/check_bogofilter.py
index 7f992ee..ed95651 100755
--- a/check_bogofilter.py
+++ b/check_bogofilter.py
@@ -1,5 +1,4 @@
#!/usr/bin/python
-import email
import imaplib
import logging
import os.path
@@ -27,6 +26,8 @@ def move_messages(ids, target):
ids_str = ','.join(ids)
client.uid('COPY', ids_str, target)
client.uid('STORE', ids_str, '+FLAGS', r'(\Deleted)')
+ # requires UIDPLUS extension in CAPABILITIES
+ client.uid('EXPUNGE', ids_str)
def process_folder(proc_fld_name, target_fld, unsure_fld, spam_fld=None,
@@ -102,7 +103,6 @@ def process_folder(proc_fld_name, target_fld, unsure_fld, spam_fld=None,
return proc_msg_count
processedCounter = 0
-hparser = email.Parser.Parser()
config = ConfigParser()
config.read(os.path.expanduser("~/.bogofilter-imap-train-rc"))