mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 00:03:03 +08:00
log waiting time for get_spam_score
This commit is contained in:
parent
9cf807f7bd
commit
ffa9304d00
1 changed files with 8 additions and 1 deletions
|
@ -611,8 +611,15 @@ async def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (boo
|
||||||
|
|
||||||
# do not use user.max_spam_score here
|
# do not use user.max_spam_score here
|
||||||
if SPAMASSASSIN_HOST:
|
if SPAMASSASSIN_HOST:
|
||||||
|
start = time.time()
|
||||||
spam_score = await get_spam_score(msg)
|
spam_score = await get_spam_score(msg)
|
||||||
LOG.d("%s -> %s - spam score %s", alias, contact, spam_score)
|
LOG.d(
|
||||||
|
"%s -> %s - spam score %s in %s seconds",
|
||||||
|
alias,
|
||||||
|
contact,
|
||||||
|
spam_score,
|
||||||
|
time.time() - start,
|
||||||
|
)
|
||||||
email_log.spam_score = spam_score
|
email_log.spam_score = spam_score
|
||||||
if spam_score > MAX_REPLY_PHASE_SPAM_SCORE:
|
if spam_score > MAX_REPLY_PHASE_SPAM_SCORE:
|
||||||
is_spam = True
|
is_spam = True
|
||||||
|
|
Loading…
Reference in a new issue