Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MimeUtils ParseMessageId function not working as expected #962

Closed
lukapor opened this issue Oct 13, 2023 · 5 comments
Closed

MimeUtils ParseMessageId function not working as expected #962

lukapor opened this issue Oct 13, 2023 · 5 comments
Labels
compatibility Compatibility with existing software

Comments

@lukapor
Copy link

lukapor commented Oct 13, 2023

I parsing some message id from eml and function not returning right value

Platform (please complete the following information):

  • OS: Windows,
  • .NET Runtime: CoreCLR
  • .NET Framework: .Net Core net7.0
  • MimeKit Version: 4.2.0 (latest)

To Reproduce
Steps to reproduce the behavior:

  1. MimeUtils.ParseMessageId("<00E19E93-513A-4A2B-964B-BB0372099DB6@@intheloop.io>");

Expected behavior
Expected behavior is to return 00E19E93-513A-4A2B-964B-BB0372099DB6@@intheloop.io but function return null value

Also MimeMessage.Load if we load eml with thats kind of format property MessageID is null

@jstedfast
Copy link
Owner

I would recommend sending a bug report to intheloop.io for malformating the message-id with 2 @ symbols.

There's very little value in changing the MineUtils.ParseMessageId() method to simply .TrimStart('<').TrimEnd('>') because you can do that yourself easily.

@lukapor
Copy link
Author

lukapor commented Oct 14, 2023

I only give an example of msg id - this happens to one of our customer not in domain intheloop.io.

I already do workaround if I dont get parsed value I do trim as you suggested.

But this problem is also appears when we want to load eml file (eml contains header for example Message-ID: <00E19E93-513A-4A2B-964B-BB0372099DB6@@domain.si> ) into MimeMessage class.

MimeMessage property MessageId is null this I think is a bug. Other eml parser let say MailBee library parse this MessagId format.

I know that msg-id according RFC 2822 - @ is not valid in definition in dot-atom-text.

I know that workaround is also to check Headers is MessageId is null, but i think that we must get message id which is defined in eml. Maybe setter of unvalid msg-id should fail, but reading eml message id not.

@jstedfast
Copy link
Owner

Are all of the parse errors caused by "@@" being in the msg-id? Or are there other syntax errors causing the parse failures as well?

@jstedfast
Copy link
Owner

I can't understand why it's so hard for so many mass-mailers to get the syntax of a Message-ID correct.

Here's another example: issue #849

@jstedfast jstedfast added the compatibility Compatibility with existing software label Oct 15, 2023
@vdona8
Copy link

vdona8 commented Feb 2, 2024

Hi, I'm having a problem in fetching email same content like subject and body but different UID and Message-Id but in my inbox its only one, Resulting in Entry Duplication in Database because my checker to prevent duplicate entry is the two of them the UID or Message-Id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with existing software
Projects
None yet
Development

No branches or pull requests

3 participants