summaryrefslogtreecommitdiffstats
path: root/check_bogofilter.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2020-07-02 17:55:21 +0200
committerMatěj Cepl <mcepl@cepl.eu>2020-07-02 18:08:37 +0200
commit08ec81019506399690caab1642563f5ea842ba02 (patch)
treecbcdee33aa611dc59104442eed05b6cbedda877e /check_bogofilter.py
parent417d5bc897929ee398349747f0546ca854ab7a89 (diff)
downloadimap-folder-training-08ec81019506399690caab1642563f5ea842ba02.tar.gz
Remove unnecessary
Diffstat (limited to 'check_bogofilter.py')
-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"))