From eacee78706c1ad7767e6c729e469b7193db55dcb Mon Sep 17 00:00:00 2001 From: Thomas Falkenberg Date: Thu, 4 Jan 2024 22:00:11 +0100 Subject: [PATCH] Update mail.py to fetch mails in bulk This speeds up the mail processing. See also https://github.com/paperless-ngx/paperless-ngx/discussions/5230 --- src/paperless_mail/mail.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py index e8a9104f6..226757315 100644 --- a/src/paperless_mail/mail.py +++ b/src/paperless_mail/mail.py @@ -569,6 +569,7 @@ class MailAccountHandler(LoggingMixin): criteria=criterias, mark_seen=False, charset=rule.account.character_set, + bulk=True ) except Exception as err: raise MailError(