Browse Source

increase spamassassin timeout to 300s

Son NK 5 năm trước cách đây
mục cha
commit
50683be4f8
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      email_handler.py

+ 2 - 2
email_handler.py

@@ -1220,9 +1220,9 @@ async def get_spam_score(message: Message) -> float:
         sa_input += b"\n"
         sa_input += b"\n"
 
 
     try:
     try:
-        # wait for at max 10s
+        # wait for at max 300s which is the default spamd timeout-child
         response = await asyncio.wait_for(
         response = await asyncio.wait_for(
-            aiospamc.check(sa_input, host=SPAMASSASSIN_HOST), timeout=10
+            aiospamc.check(sa_input, host=SPAMASSASSIN_HOST), timeout=300
         )
         )
         return response.headers["Spam"].score
         return response.headers["Spam"].score
     except asyncio.TimeoutError:
     except asyncio.TimeoutError: