Ignore public folders, fixed error message in logs

This commit is contained in:
Christoph Haas 2017-05-07 00:40:45 +02:00
parent 1ab70fbf1e
commit 5903684dda
1 changed files with 5 additions and 4 deletions

View File

@ -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):