From 3c3adda8818c9ce63d4ee4e9d7ad43182724f1dc Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 29 Dec 2024 11:34:30 +0200 Subject: [PATCH] search undeleted messages --- imap_filter/imap_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap_filter/imap_filter.py b/imap_filter/imap_filter.py index 5dc34ce..19ab795 100644 --- a/imap_filter/imap_filter.py +++ b/imap_filter/imap_filter.py @@ -74,7 +74,7 @@ class ImapFilter: ) self.imap.select(mailbox=mailbox['mailbox'], readonly=False) self._log.debug("Searching for all messages in mailbox '%s'...", mailbox['mailbox']) - typ, data = self.imap.search('UTF-8', 'ALL') + typ, data = self.imap.search('UTF-8', 'UNDELETED') if typ != 'OK': self._log.error('Error, server replied: %s', data) return False