first mailboxes
This commit is contained in:
parent
9b594126a8
commit
3bce131f19
1 changed files with 8 additions and 7 deletions
|
@ -61,6 +61,14 @@ class BackupImap:
|
||||||
self._process_mailbox(self.config['mailbox'])
|
self._process_mailbox(self.config['mailbox'])
|
||||||
|
|
||||||
def _process_mailbox(self, mailbox):
|
def _process_mailbox(self, mailbox):
|
||||||
|
self._log.debug("Searching for all mailboxes in mailbox '%s'...", mailbox)
|
||||||
|
list_response, list_data = self.imap.list(f"\"{mailbox}\"", '*')
|
||||||
|
if list_response == 'OK':
|
||||||
|
for subdir in list_data:
|
||||||
|
sub_mailbox = self._parse_mailbox(subdir)
|
||||||
|
if sub_mailbox != mailbox:
|
||||||
|
self._process_mailbox(self._parse_mailbox(subdir))
|
||||||
|
|
||||||
self._log.debug(
|
self._log.debug(
|
||||||
"Seleting mailbox '%s'",
|
"Seleting mailbox '%s'",
|
||||||
mailbox
|
mailbox
|
||||||
|
@ -143,13 +151,6 @@ class BackupImap:
|
||||||
message_path,
|
message_path,
|
||||||
error
|
error
|
||||||
)
|
)
|
||||||
self._log.debug("Searching for all messages in mailbox '%s'...", mailbox)
|
|
||||||
list_response, list_data = self.imap.list(f"\"{mailbox}\"", '*')
|
|
||||||
if list_response == 'OK':
|
|
||||||
for subdir in list_data:
|
|
||||||
sub_mailbox = self._parse_mailbox(subdir)
|
|
||||||
if sub_mailbox != mailbox:
|
|
||||||
self._process_mailbox(self._parse_mailbox(subdir))
|
|
||||||
|
|
||||||
def _parse_mailbox(self, data):
|
def _parse_mailbox(self, data):
|
||||||
result = data
|
result = data
|
||||||
|
|
Loading…
Reference in a new issue