+1 vote

This is an email saved from Outlook to an MSG file, and opened up again in code (in case that's an issue!).

myMail.IsDKIMSigned is true, but when I then call myMail.CheckDKIMSignature(), the error is thrown :

"Object reference not set to an instance of an object."

Stack trace is as follows :

at Limilabs.Mail.MimeDocument. \u0003\u0004()\r\n at Limilabs.Mail.MimeDocument. \u0003 (RSACryptoServiceProvider rsa, DKIMValidationConfiguration configuration)\r\n at Limilabs.Mail.MimeDocument. \u0003\u0003(DKIMValidationConfiguration configuration)\r\n at   .CheckDKIMSignature()\r\n at ... THIS THEN GOES IN TO MY FUNCTION NAMES"

by
Can you please send us the raw eml (zipped) and the code you use to the support address you can find in a footer of this page?
I'm afraid that's not possible, as the mail content is covered by an NDA. The CheckDKIMSignature() doesn't require any additional information other than what is in the mail itself does it?
Public keys are downloaded from DNS.
Can you remove/anonymize message body. "Object reference.." seems like a bug.

Can you also try using the latest version (https://www.limilabs.com/mail/download)?
I'd really like to analyse this one. Can you please provide us some more information - message with body replaced should be enough to verify.
How can I do this easily once I've got the msg file opened up with :

                using (var converter = new MsgConverter(testFilename))
                {
                    if (converter.Type == MsgType.Note)
                    {
                        IMail mail = converter.CreateMessage();
Use mail.Save("c:\\test\\test.eml") and then your favorite text editor (notepad).
ok, sent the eml file through
How is the investigation going? I'm thinking it might be related to the mails when they are exported from Outlook to an MSG file. I'm not sure the problem happens when the mails are examined straight from the IMAP Inbox....
"Object reference " error is of course a bug. We are able to reproduce it and it's going to be fixed in the next version. It happens only for messages converted from MSG format.

Nevertheless it is impossible to validate DKIM signature for MSG messages. The problem is that MSG format doesn't store MIME data in the same format as they were signed.  

Basically MSG modifies message so drastically it is impossible to validate the signature.

1 Answer

0 votes

"Object reference" bug is fixed in the latest version.

Nevertheless it is impossible to validate DKIM signature for MSG messages. MSG files don't store MIME data in the same format as it was signed.
Basically MSG modifies message so drastically it is impossible to validate the signature.

by (297k points)
...