add comment

This commit is contained in:
Antonio J. Delgado 2025-03-28 10:37:20 +02:00
parent df051d884d
commit d3ebe125ee

View file

@ -100,6 +100,7 @@ class BackupImap:
if not os.path.exists(mailbox_path):
os.mkdir(mailbox_path)
current = time.gmtime()
# One year at a time because big mailboxes will take all memory due to Python IMAP library memory handling
for year in range(current.tm_year-10, current.tm_year+1):
search_response, search_data = self.imap.search('UTF-8', f'(BEFORE "1-Jan-{year}")')
if search_response == 'OK':