A winmail.dat attachment is a container in Microsoft's Transport Neutral Encapsulation Format (TNEF). Outlook or Exchange creates it when a message is sent in Rich Text Format, or when the server converts it that way, and it holds the formatting plus the real attachments. Mail programs that do not understand TNEF show only an unreadable file named winmail.dat, with the intended attachments hidden inside it.
If you received one, you can open it with a TNEF extraction tool or ask the sender to resend. If you send mail from Outlook or administer Exchange, you can stop it from being created by choosing HTML or plain text and by disabling TNEF for outside recipients. This guide covers all three roles.
What winmail.dat actually contains
TNEF is a Microsoft format that packages rich text formatting, embedded objects, calendar and meeting data, and file attachments into one binary blob. Outlook and Exchange understand it natively, so between two Outlook users nothing looks wrong. When the recipient uses another client, the message arrives with one attachment whose MIME header looks like this:
Content-Type: application/ms-tnef; name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="winmail.dat"You can confirm the type by viewing the message source. If you are not sure how, see how to view email headers and source. The structure around attachments is explained in MIME attachments and multipart types.
Why Outlook creates it
- Rich Text Format message. The sender composed the message in RTF format. RTF is an Outlook specific format and is best avoided for internet mail.
- Contact setting. The recipient's contact entry in the sender's address book was set to send in Rich Text Format.
- Server conversion. An Exchange remote domain setting, or an older default, converts messages to TNEF when sending to certain external domains.
- Calendar and meeting items. Some meeting content and embedded objects travel in TNEF when sent from Outlook in particular configurations.
- Forwarding. Forwarding an RTF original can keep the format.
Modern Outlook defaults to HTML for new messages, so a winmail.dat today usually points to an explicit RTF setting on the sender, the contact or the Exchange configuration.
How to open winmail.dat as a recipient
The attachment cannot be opened with an ordinary program, because the real files are inside. Use one of these routes. Tool names and availability change, so check each tool's own site and be careful to download only from official sources, since fake extractors are a known malware vector.
| Platform | Approach | Notes |
|---|---|---|
| Windows | A TNEF extractor or viewer application | Choose a well known tool from its official site; scan the output files |
| macOS | A TNEF viewer app from the App Store or a developer site | Extract, then open the files normally |
| Linux | The tnef command line tool from your package manager | Run it against the file to extract the attachments |
| Android and iOS | A TNEF capable app, or open the message on a computer | Mobile support is limited |
| Any platform | Reply and ask the sender to resend as a normal attachment | Often the quickest and safest option |
| Webmail | Some webmail providers decode TNEF automatically; others do not | If you see only winmail.dat, use a desktop tool or ask for a resend |
On Linux the extraction is typically:
# Debian or Ubuntu
sudo apt install tnef
# Extract into a folder
mkdir extracted
tnef -C extracted winmail.dat
ls extractedPackage names and options vary between distributions, so read the tool's manual page (man tnef) if the command differs on your system. Never open an extracted executable or macro enabled document unless you trust the sender. If you did not expect the message, treat it as a possible phishing attempt: see how to recognise a phishing email.
How to stop sending winmail.dat from Outlook
As a sender, fix the cause so recipients receive normal attachments.
- Open a new message and check the message format. In classic Outlook, look at the Format Text tab and choose HTML or Plain Text instead of Rich Text. Menu names differ in new Outlook and in Outlook on the web, so confirm in Microsoft's current documentation.
- For replies, check the format of the original message, since replying can keep its format.
- Open the recipient's contact entry and check any setting that sends using plain text or rich text for that person. Set it to let Outlook choose the best format, or to plain text.
- In the Outlook options for mail composition, set the default compose format to HTML.
- Send a test to an external account on a different provider and view the attachments.
Plain text suits simple messages. For layout and images use HTML, and consider how clients display it: plain text email explains the trade-offs.
How administrators prevent it in Exchange
Exchange and Exchange Online decide whether to use TNEF for each remote domain. Setting TNEF off for the default remote domain prevents the server from sending winmail.dat to outside recipients. In Exchange Management Shell or Exchange Online PowerShell:
# See the current setting
Get-RemoteDomain Default | Format-List Name,DomainName,TNEFEnabled
# Never send TNEF to external recipients
Set-RemoteDomain Default -TNEFEnabled $falseThe TNEFEnabled parameter takes three states: true forces TNEF, false disables it, and leaving it unset lets the sending client's preference decide. Another remote domain entry that targets a specific external domain can override the default, so list all of them with Get-RemoteDomain if a particular partner still receives winmail.dat. Changes can take a short time to apply. Run these commands with the right administrative role, test on a non-production domain first if you can, and confirm the current parameter details in Microsoft's Exchange documentation.
Verify that the fix worked
After changing the format or the Exchange setting, send a test message with a small attachment to a mailbox at a different provider than yours, ideally one that does not use Outlook. Open the original source of the received message and look at the structure. A healthy message has a multipart/mixed container with the attachment as its own part, with its real file name and type such as application/pdf. A message that still contains application/ms-tnef means TNEF is still being applied somewhere, so check the message format, the contact entry and any remote domain entry that matches the recipient's domain, in that order.
Remember that a message already sent stays as it was. Fixing the setting only changes new messages, and a forwarded or replied message may carry over the old format from the original. For recurring mail from shared mailboxes or distribution lists, test each sender identity separately, because a setting changed on your own profile does not change another mailbox's compose format.
Related attachment problems that look similar
| What you see | Different cause | Where to look |
|---|---|---|
| Attachment with a random name and no extension | Missing or broken Content-Disposition header | Inspect the MIME structure |
| Attachment shown as a long encoded string | Encoding problem in an old client | MIME encoded words |
| Attachment removed or replaced with a notice | Security gateway policy | Ask the recipient organisation about attachment policy |
| Message bounced as too large | Size limit, not format | Email size limits |
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Every message to Gmail or a Mac user has winmail.dat | Sender uses RTF or contact set to RTF | Switch to HTML or plain text; check the contact setting |
| Only some recipients see it | Their clients lack TNEF support | Ask them to use an extractor; fix the sender side |
| Fixed in Outlook but still occurs from the shared mailbox | Exchange remote domain forces TNEF | Set TNEFEnabled to false for the relevant remote domain |
| Extractor shows nothing inside | Container corrupted or only formatting data | Ask for resend |
| Mailing from an application, not Outlook | Application composes its own MIME; unlikely TNEF | Inspect the raw message and the library settings |
Summary: winmail.dat is a TNEF wrapper from Outlook or Exchange, and it is best fixed at the source. Recipients can extract the hidden files with a TNEF tool or request a resend. Senders should use HTML or plain text, and administrators should disable TNEF for external remote domains. Apply the fix, send yourself a test through a different provider, and confirm the attachment arrives as a normal file.
Sending application mail with clean attachments? Submit standard MIME messages over a documented SMTP relay.
References and further reading
Frequently asked questions
What is a winmail.dat file?
A TNEF container created by Outlook or Exchange that holds rich text formatting and the real attachments. Clients without TNEF support show only the container.
How do I open winmail.dat?
Use a TNEF extraction tool on your platform, such as the tnef command line tool on Linux, or ask the sender to resend the files normally.
Why do I receive winmail.dat from Outlook users?
The sender used Rich Text Format, a contact is set to send rich text, or Exchange converts messages to TNEF for your domain.
How can a sender prevent winmail.dat?
Compose in HTML or plain text and check the contact format setting. Administrators can set TNEFEnabled to false on the remote domain.
Is winmail.dat dangerous?
The format itself is not a virus, but it can hide attachments, so scan extracted files and treat unexpected messages with caution.