add all to search
This commit is contained in:
parent
1a0f334bc4
commit
7a94ed1b36
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ class BackupImap:
|
||||||
# One year at a time because big mailboxes will take all memory due to Python IMAP library memory handling
|
# One year at a time because big mailboxes will take all memory due to Python IMAP library memory handling
|
||||||
previous_year=1970
|
previous_year=1970
|
||||||
for year in range(current.tm_year-10, current.tm_year+1):
|
for year in range(current.tm_year-10, current.tm_year+1):
|
||||||
search_response, search_data = self.imap.search('UTF-8', f'(SINCE "1-Jan-{previous_year}" BEFORE "1-Jan-{year}")')
|
search_response, search_data = self.imap.search('UTF-8', '(ALL)', f'(SINCE "1-Jan-{previous_year}" BEFORE "1-Jan-{year}")')
|
||||||
previous_year = year
|
previous_year = year
|
||||||
if search_response == 'OK':
|
if search_response == 'OK':
|
||||||
all_msgs_uids = search_data[0].split()
|
all_msgs_uids = search_data[0].split()
|
||||||
|
|
Loading…
Reference in a new issue