summaryrefslogtreecommitdiff
path: root/imap-tool
diff options
context:
space:
mode:
authorPaul Kocialkowski2023-04-17 10:51:49 +0200
committerPaul Kocialkowski2023-04-17 10:51:49 +0200
commit8a875658b892e0e58eb5210a2ffe59a7bf5db317 (patch)
tree3fde784f160f3d7f77b58e882960ba618726a3dc /imap-tool
parent7394d263fe583b4d0493b20ba05002382103978b (diff)
imap-tool: Expunge mailbox after copy
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'imap-tool')
-rwxr-xr-ximap-tool4
1 files changed, 2 insertions, 2 deletions
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