search undeleted messages

This commit is contained in:
Antonio J. Delgado 2024-12-29 11:34:30 +02:00
parent 72b995dcb1
commit 3c3adda881

View file

@ -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