Ignore public folders, fixed error message in logs
This commit is contained in:
parent
1ab70fbf1e
commit
5903684dda
@ -49,10 +49,11 @@ class Checker(object):
|
|||||||
if item.message_class == 'IPM.Note':
|
if item.message_class == 'IPM.Note':
|
||||||
spamstatus = item.header(self.spamheader)
|
spamstatus = item.header(self.spamheader)
|
||||||
if spamstatus is not None:
|
if spamstatus is not None:
|
||||||
if item.folder == item.store.user.junk and not spamstatus.lower().startswith('yes'):
|
if item.store.user: # skip public stores
|
||||||
self.learn(item)
|
if item.folder == item.store.user.junk and not spamstatus.lower().startswith('yes'):
|
||||||
if item.folder == item.store.user.inbox and spamstatus.lower().startswith('yes'):
|
self.learn(item)
|
||||||
self.unlearn(item)
|
if item.folder == item.store.user.inbox and spamstatus.lower().startswith('yes'):
|
||||||
|
self.unlearn(item)
|
||||||
|
|
||||||
def learn(self, item):
|
def learn(self, item):
|
||||||
with log_exc(self.log):
|
with log_exc(self.log):
|
||||||
|
Loading…
Reference in New Issue
Block a user