Use Media Type from RFC 8551 for S/MIME creation
When setting up a mail server with rspamd, I noticed that S/MIME signed mails sent from Evolution get flagged with the MIME_BAD_ATTACHMENT
symbol, meaning (as far as I can tell) that an attachment was declared with a Media Type that doesn't match its file name extension.
Rspamd wants attachments with a p7s extension to be declared with a Media Type of application/pkcs7-signature
, while the mail that was flagged had declared the signature application/x-pkcs7-signature
.
Thinking that rspamd was just overly sensitive in that regard, I searched for the correct media type and found that the IANA registry lists only the former and the S/MIME RFC also doesn't mention the latter.
This patch corrects the Media Types that are assigned to S/MIME content to comply with RFC 8551.
It was tested on Fedora 30 and confirmed to be working: S/MIME signed mails are no longer flagged with the MIME_BAD_ATTACHMENT
symbol by rspamd.