a Customer of ours comes up with a requirement to improve an existing email business service within one of his ensemble productions. The services fetches emails from a mailserver on a daily basis and extract attached files from this email and send them along with some meta information through the production.
The sender of the email uses email signatures (which is embedded as smime.p7s). This gives us some problems when consuming this email. As a temporary workaround the email server forward the email to itself to remove the signature (which isn´t embedded when emails are forwarded). To get rid of this workaround and to have the additional feature to validate the email signature I am looking for a good starting point.
Extracting the signature file smime.p7s from the %Net.MailMessage might be the start, next step would be to verify the signature with the senders vertificate. Does anyone has already done such a thing?
I am grateful for any hints on a workflow for doing this and further points to consider.