Winmail.dat attachment

Content-Type: application/ms-tnef; name="winmail.dat"

Winmail.dat attachment – One of my user sending emails from Outlook application and Exchange online office365 complains the recipient is receiving a winmail.dat attachment in every email she sends to one specific recipient domain, however, the same email is received by yahoo and other email domain without any winmail.dat attachment. Sender has tried setting her outlook to ensure ‘only plain text’ is used when composing email but still recipient is getting winmail.dat. So why is this one specific recipient domain getting winmail.dat attachments even when outlook has been set to use only plain text?

Solution:

1. Make sure to get more details if you can about the recipient domain mail system, for me I found out from their website that they recommend ‘plain text’ emails over html or rich text, as their mail system can have problems decoding other mail formats.

2. Check the message email headers of your sender, you can see the content-type showing “winmail.dat” instead of content-type “plain text” :-

Content-type in Message header of email sent that contains winmail.dat:-

Content-Type: application/ms-tnef; name="winmail.dat"

Content-type in Message header of email sent that uses plain text and does not contain winmail.dat:-

Content-Type: text/plain; charset="us-ascii"

3. What is winmail.dat?

Outlook and Exchange uses the Transport Neutral Encapsulation Format (TNEF) format for your emails that contains rich text format (RTF), RTF files offer some formatting features like bold, italic, underline, bullets, different fonts, and text justification. Messaging systems that aren’t based on Microsoft Exchange may be unable to interpret messages that use this rich text format. If the recipient’s messaging system can’t process this format, a file attachment that’s called Winmail.dat is added to the message.

Note: By default, email messages that are sent from Exchange Online in Office 365 use the Transport Neutral Encapsulation Format (TNEF) format

4. If your recipient domain email system cannot decipher TNEF and a winmail.dat is received, then Office 365 admins can use Exchange online PowerShell to change the message format to prevent the Winmail.dat attachment from being sent to those external recipients. To do this:-

Connect to Office365 Exchange Online using Remote PowerShell

  1. Run the following Windows PowerShell commands to configure the message format as plain Text Only for a specific external recipient:
Set-MailContact <ExternalEmailAddress or GUID> -UseMapiRichTextFormat Never
Set-MailContact -Identity <ExternalEmailAddress or GUID> -UsePreferMessageFormat $True 

Run the following Windows PowerShell command to confirm that the message format was applied:-

Get-MailContact | Select <ExternalEmailAddress or GUID> | Select UseMapiRichTextFormat

2. To Change the message format for all messages that are sent to a specific domain
This method requires you to create a remote domain object in Exchange Online to control how messages are sent to external domains. You can also use this method to change the message format for messages that are sent to coexistence domains.

Connect to Office365 Exchange Online using Remote PowerShell

Run the following Windows PowerShell command to create a remote domain for an external domain:

New-RemoteDomain -Name <Name of External Domain> -DomainName 

Run the following Windows PowerShell command to prevent messages from being sent in rich text format:

Set-RemoteDomain -Identity <Name of Domain> -TNEFEnabled $false 

Run the following WindowsPowerShell command to check that the setting was applied:

Get-RemoteDomain -Identity <Name of Domain>| Select TNEFEnabled 

More info on Microsoft docs – https://docs.microsoft.com/en-us/exchange/mail-flow/content-conversion/tnef-conversion?view=exchserver-2019