From 8a875658b892e0e58eb5210a2ffe59a7bf5db317 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Mon, 17 Apr 2023 10:51:49 +0200 Subject: imap-tool: Expunge mailbox after copy Signed-off-by: Paul Kocialkowski --- imap-tool | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'imap-tool') diff --git a/imap-tool b/imap-tool index f88f9b7..dab6ff8 100755 --- a/imap-tool +++ b/imap-tool @@ -185,11 +185,11 @@ class imap_tool(): print("Error deleting " + str(len(uids)) + " messages from mailbox " + self.mailbox) raise Exception() + imap.expunge() + print("Archived " + str(len(uids)) + " messages to mailbox " + mailbox_archive) uids = [] - - imap.expunge() except Exception: imap.logout() return 1 -- cgit v1.2.3