summaryrefslogtreecommitdiff
path: root/.maildirproc
diff options
context:
space:
mode:
Diffstat (limited to '.maildirproc')
-rw-r--r--.maildirproc/default.rc13
1 files changed, 8 insertions, 5 deletions
diff --git a/.maildirproc/default.rc b/.maildirproc/default.rc
index d7351c5..1661527 100644
--- a/.maildirproc/default.rc
+++ b/.maildirproc/default.rc
@@ -46,24 +46,25 @@ def handle_incoming_spam_training(mail):
def handle_incoming_ham_training(mail):
bogofilter_ham(mail)
- mail.move(".Ham")
+ handle_incoming_ham(mail)
def handle_incoming_ham(mail):
my_filters(mail)
+def handle_incoming_spam(mail):
+ mail.move(".Bulk Mail")
def handle_incoming_unknown(mail):
# Filter spam
spam = bogofilter_auto(mail)
if spam == 0:
- mail.move(".Bulk Mail")
+ handle_incoming_spam(mail)
return
elif spam == 1:
- mail.move(".Ham")
+ handle_incoming_ham(mail)
return
elif spam == 2:
# maybe spam
- my_filters(mail)
return
else:
mail.move(".Error")
@@ -318,11 +319,13 @@ def my_filters(mail):
mail.move(".misc.accounts")
return
+ mail.move(".Ham")
+
handle_mapping = {
".": handle_incoming_unknown,
".spam-training": handle_incoming_spam_training,
".ham-training": handle_incoming_ham_training,
- ".Ham": handle_incoming_ham,
+ #".Ham": handle_incoming_ham,
}
processor.maildirs = handle_mapping.keys()
for mail in processor: