Xubuntu: Unpacking winmail.dat Files

Mary’s compadres sometimes send her pictures of garden vegetables and quilting projects. Those pictures usually pass through Microsoft Outlook (or its ilk) and emerge in winmail.dat files that aren’t particularly useful in a Linux context. That page gives a good overview of the problem and how to resolve it; I’m just documenting the process here, so I can find it again.

Start by installing both tnef and convmv. I think the latter isn’t needed in our situation, because most folks use flat ASCII file names that come through just fine.

Save the attachment in, say /tmp and unleash tnef on it:

cd /tmp
tnef --file=winmail.dat

That unpacks all the attachments into /tmp, where one may have one’s way with them.

It’s not worth my effort to bolt that into the email programs and then maintain that mess across updates, so we’ll do it by hand as needed.

Microsoft certainly had a good reason for inventing Yet Another Encapsulation Format, although I wonder why good old ZIP wouldn’t have worked nearly as well…