Exception: rawText does not contain a valid rfc2822 header field
Problem reported by Miguel Enrique - 10/2/2024 at 12:51 AM
Submitted
Hello.

Since I updated to version 9035 in the Delivery Log, I find a multitude of errors with the text: Exception: rawText does not contain a valid rfc2822 header field.

These are emails that are received, but that for smartermail are not correct, but that last week were received without problems.

In the end the sender receives a bounce and the email does not reach the recipient.

Is anyone else experiencing this problem?
Tony Scholz Replied
Employee Post
Hello Miguel, 

Can you send a test message to ascholz@beta.smartermonitor.com for review. Thank you
Tony Scholz
Lead Network/System Administrator
SmarterTools Inc.
Miguel Enrique Replied
Hello. I have created a ticket and it is being reviewed.
terry fairbrother Replied
What was the outcome of this as my delivery logs show these and have several emails stuck in the spool yet opening the email says the message no longer exists


[2026.10.02] 09:54:11.116 [69839754] Starting local delivery to redacted
[2026.10.02] 09:54:11.116 [69839754] Exception: rawText does not contain a valid rfc2822 header field
[2026.10.02]    at SmarterMail.Standard.Network.MIME.MimeHelper.OldMime.MimeHeader.Parse()
[2026.10.02]    at SmarterMail.Standard.Network.MIME.MimeHelper.OldMime.MimeParser.ReadPart(MimePart part, Int32 depth, String defaultContentType, String defaultContentSubtype)
[2026.10.02]    at SmarterMail.Standard.Network.MIME.MimeHelper.OldMime.MimeParser.Parse()
[2026.10.02]    at SmarterMail.Standard.Network.MIME.MimeHelper.OldMime.MimeReader.GetParts()
[2026.10.02]    at MailService.ContentFiltering.伻.DeliverFilterMessage(丄侽 spoolMessage, LocalRecipient localRecipient)
[2026.10.02]    at SmarterMail.MailService.RelayServer.MessageQueue.丄俦.DeliverToLocalRecipientAsync(丄侽 spoolMessage, LocalRecipient localRecipient, db_system_settings_readonly systemSettings, db_system_delivery_settings_readonly systemDeliverySettings)
[2026.10.02] 09:54:11.116 [69839754] Removed from LocalDeliveryQueue (0 queued or processing)


restarting the spool doesn't make the que disappear
Ricardo Ranieri Replied
Hello

The same problem from @icloud.com

[2026.10.02] 10:36:36.683 [40693596] Exception: rawText does not contain a valid rfc2822 header field

terry fairbrother Replied
it was icloud accounts that were the issue
Douglas Foster Replied
It is probably detecting the problem below.   This text is from the Declude Antivirus documentation document.

Outlook 'Space Gap' Vulnerability: This vulnerability occurs when there is a space in one of the MIME
headers where there is not normally a space (such as "Content-Type :" instead of "Content-Type:"). This is not RFC-compliant, but Outlook will treat it as valid and be able to see a virus that virus scanners will not usually see. There is no legitimate reason for an E-mail to be formed like this.

If the email is legitimate, you can probably solve the problem by removing the space character.    Before delivering the document to the recipient, it would be wise to determine why the header is malformed.   ICloud.com should know how to format a header, so where did the malformed header originate?

Reply to Thread

Enter the verification text