Only delete mails if attachements are succesfully saved to tmp location
Closed this issue · 2 comments
f0sh commented
Hey,
I have run into the following issue:
[INFO] imap: found 19 messages, 0 unseen
[INFO] imap: found attachment: <filename>.zip
[INFO] imap: save attachment to: /tmp/dmarc_files/<filename>.zip
[ERROR] imap: open /tmp/dmarc_files/<filename>.zip: permission denied, skip
[...]
[ERROR] processFiles: reports list is empty
I the description it says:
delete (bool): delete email messages from IMAP server if reports are fetched successfully
So the expected behaviour should be, that the email messages are only deleted, if they are saved succesfully.
However the observed behavious is, that all found emails are going to be deleted from the inbox, although the file could not be saved.
tierpod commented
Thank you for report, I'll investigate it.