x-dg-ref Header is too Long

TLDR – x-dg-ref is a property of header X-MS-TNEF-Correlator, not a real header. It’s too big because you’re using rich text in Outlook. Switch to HTML and problem solved.

More words and Majesty

Working a case this week where customer was getting an error “5.5.0 x-dg-ref Header is too long” causing messages to be rejected, and it took way more then 30 minutes to find the answer – which means the answer needs to be written down –  After obtaining an email header and looking at 700 lines of x-dg-ref header I could see that the header was indeed too large. The customers solution was to create a transport rule to remove the header x-dg-ref from messages to the domain rejecting them. Message tracking was showing the rule was applied correctly but it was not removing the header. Confused over why the rule was not working the customer opened a ticket to my team to investigate the rule not working.

After verifying the rule was correct more research took place, and it turns out this is actually a rich text vs. HTML issue caused by Outlook. In certain cases when you add an attachment to a message Outlook will add the attachment to the message header under the X-MS-TNEF-Correlator header as a header property x-dg-ref. Swapping Outlook to HTML from rich text solves the problem of the header being too large – and it explains why the rule did not work. x-dg-ref is not a header at all, it’s a property of another header X-MS-TNEF-Correlator. – That’s some tricky stuff right there.

 

x-dg-ref.png
how the header shows up in notepad

In real like the above header should actually read more like below –
X-MS-TNEF-Correlator:  x-dg-ref: =?etf-8?RASDDFASFDLJASDFJ

Pictures are Great

The above image is not really enough to make for a pretty picture for the post. How about a picture of the digital waterfall from the building I work in.

IMG_7713 (1)
Digital waterfall in a rainbow gradient

Leave a Reply