axllent / imap-scrub

A ultility to trim down your IMAP mailbox by saving & removing attachments or deleting messages based on rules
MIT License
20 stars 5 forks source link

Add support for signed messages #6

Open allentiak opened 1 year ago

allentiak commented 1 year ago

Hi,Ralf, Great tool!

Trying it on my old messages, I discovered it also removes digital signatures - Which probably isn't what one would want... Chances are, this is an unintended side-effect?

After quickly reading RFC 8551[1], it seems that in order to support signed messages, you just have to avoid removing attachments named "smime.p7m", "smime.p7s", or "smime.p7z" by default.

Maybe the option could be named as follows? keep digital signatures (default: true)

[1]: S/MIME Version 4.0 Specification: https://www.rfc-editor.org/rfc/rfc8551

allentiak commented 1 year ago

UPDATE: Relevant RFC: S/MIME Version 4.0 Specification: https://www.rfc-editor.org/rfc/rfc8551