set SpamAssassin timeout to 300s

This commit is contained in:
Son NK 2020-09-30 14:03:19 +02:00
parent 770b15aba3
commit 6253a4eb23
1 changed files with 2 additions and 1 deletions

View File

@ -1510,7 +1510,8 @@ def get_spam_score(message: Message) -> float:
sa_input += b"\n"
try:
sa = SpamAssassin(sa_input, host=SPAMASSASSIN_HOST)
# wait for at max 300s which is the default spamd timeout-child
sa = SpamAssassin(sa_input, host=SPAMASSASSIN_HOST, timeout=300)
return sa.get_score()
except Exception:
LOG.exception("SpamAssassin exception")