Browse Source

Ignore public folders, fixed error message in logs

master
Christoph Haas 5 years ago
parent
commit
5903684dda
  1. 9
      kopano-spamd.py

9
kopano-spamd.py

@ -49,10 +49,11 @@ class Checker(object):
if item.message_class == 'IPM.Note':
spamstatus = item.header(self.spamheader)
if spamstatus is not None:
if item.folder == item.store.user.junk and not spamstatus.lower().startswith('yes'):
self.learn(item)
if item.folder == item.store.user.inbox and spamstatus.lower().startswith('yes'):
self.unlearn(item)
if item.store.user: # skip public stores
if item.folder == item.store.user.junk and not spamstatus.lower().startswith('yes'):
self.learn(item)
if item.folder == item.store.user.inbox and spamstatus.lower().startswith('yes'):
self.unlearn(item)
def learn(self, item):
with log_exc(self.log):

Loading…
Cancel
Save