tierpod / dmarc-report-converter

Convert dmarc reports from xml to human-readable formats
MIT License
223 stars 25 forks source link

Only delete mails if attachements are succesfully saved to tmp location #19

Closed f0sh closed 2 years ago

f0sh commented 2 years ago

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 2 years ago

Thank you for report, I'll investigate it.

tierpod commented 2 years ago

https://github.com/tierpod/dmarc-report-converter/releases/tag/v0.5.4