question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to parse signed email

See original GitHub issue

signed-messages.zip There are particular emails where MsgReader unable to parse. See attached both sample emails, one is parse-able and second is not.

Note: Both messages are signed by same sender from Thunderbird and we are parsing inside an Outlook VSTO addin

I have used particular code snippet to parse message

string emailPath = @"C:\signed-by-ms-admin-valid.msg"; MsgReader.Mime.Message mailMessage = new MsgReader.Mime.Message(File.ReadAllBytes(emailPath), true);

See attached sample messages

  1. signed-by-ms-admin-valid.msg is parsing correctly. Above code extracting signer’s certificate under SignedCertificate attribute
  2. signed-by-ms-admin-tampered.msg is failed to parse by above code snippet.

Expected behavior Ideally both kind of messages should be parsed.

Desktop (please complete the following information):

  • OS: Windows 10, 11
  • Outlook 2019, O365, 2021

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Sicos1977commented, Jul 9, 2022

I changed something in the latest nuget package so that the signed information is also reflected to the message object

0reactions
Sicos1977commented, Jul 9, 2022

I tried both you messages but can open them without any problems

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Parse Email in Python
I've been able to obtain data from the headers using the following code. >>> from email.parser import Parser >>> p = Parser() >>>...
Read more >
“Unable to parse or decode the contents of the email” when ...
Hi, When receiving an email with Chinese letters in email service of my system, I am getting the following error message:
Read more >
E-Mail parse error (when email comes from office 365 and ...
Hi, We use osTicket 1.10. We have a strange problem if mail comes from office365 (users use outlook 2016). Mail body is not...
Read more >
Parsing Email Signatures: The Ultimate Guide
As a result, email parsers often have difficulty identifying and extracting the necessary information from email signatures.
Read more >
ActionMailer failing to parse a signed email message
I have this email with a signed signature that is attached. running email.body on this message returns an empty string, even though there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found