As an opensource shop, one of the strangest problems we had to face with email is the way Microsoft Outlook/Outlook Express handles email attachments. They decided to encode the attachments into a single attachment and name it winmail.dat. Third party applications don't seem to want to open it. So how do you get around it?
Here's how we did it!! We process our email in-house and MIMEdefang is one of the packages we use. If you've never heard of it, MIMEDefang lets you inspect, modify, bounce and reject email before it is passed on to the next mail server. You can strip out potentially harmful attachments like .exe, .scr, .bat, etc... It also lets you check for viruses, Spam and other unwanted content. If you can dream it up, you can get MIMEDefang to do it.
When an attachment comes through and it is of the winmail.dat variety, simply let MIMEDefang run a procedure against it to extract the real attachments and discard the winmail.dat part.
See the extended article for detailed code.
Continue reading "Microsoft Outlook and Winmail.dat Files"