summaryrefslogtreecommitdiffstats
path: root/check_bogofilter.py
diff options
context:
space:
mode:
Diffstat (limited to 'check_bogofilter.py')
-rwxr-xr-xcheck_bogofilter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/check_bogofilter.py b/check_bogofilter.py
index 89253ea..f581f92 100755
--- a/check_bogofilter.py
+++ b/check_bogofilter.py
@@ -29,7 +29,7 @@ def move_messages(ids, target):
client.uid('STORE', ids_str, '+FLAGS', r'(\Deleted)')
-def process_folder(proc_fld_name, junk_fld, unsure_fld,
+def process_folder(proc_fld_name, target_fld, unsure_fld,
bogofilter_param=['-l']):
ham_msgs = []
@@ -84,7 +84,7 @@ def process_folder(proc_fld_name, junk_fld, unsure_fld,
else: # 3 or something else I/O error
raise IOError('Bogofilter failed with error %d', ret_code)
- move_messages(spam_msgs, junk_fld)
+ move_messages(spam_msgs, target_fld)
move_messages(unsure_msgs, unsure_fld)
if ham_msgs:
client.uid('STORE', ','.join(ham_msgs), '-FLAGS', r'(\Seen)')
@@ -104,7 +104,7 @@ server = config.get("imap-training", "server")
client = imaplib.IMAP4_SSL(server)
client.login(login, password)
-processedCounter += process_folder('INBOX', 'Junk', 'Unsure')
+processedCounter += process_folder('INBOX', '_suspects', '_unsure')
client.logout()