Friday, November 06, 2009

Almost everything you ever wanted to know about the MSG (stand alone Outlook Email message) file format but were afraid to ask (Part 1)

Microsoft Open Specification Support Team Blog - .MSG File Format (Part 1)

“In my previous two blog entries, I’ve focused on becoming familiar with the Compound File Binary Format which we discovered was similar to a FAT file system within a file.  With that exercise behind us we’re ready to step up a level in the ecology of file formats.  Analogous to ascending from chemistry to simple cell organisms, CFBF has given us the building blocks with which the great variety of application file formats are assembled. 

Recently, I took the time to expand my view of application formats by investigating the workings of Outlook’s .msg format.  Specifically, I was required to explain how a Rights Managed Email message could be dissected in order to read the contents hidden within.  Having only a cursory knowledge of the Outlook message file format (.msg), and that being based of course, on CFBF, I needed only to discover where the critical components of the email message could be found.  I will divide this blog into two parts.  In part 1, I will overview the message file format described in MS-OXMSG in preparation for part 2.  In part 2, I will describe in some detail, including code fragments how to find the compressed email attachment in a rights managed email and how it can be decompressed in order to read it plainly. 

.MSG

In this overview section, my goal is to describe the message store structure in a way that will enable you, the reader to recognize quickly the storages and streams in a sample .msg file and understand what you’re seeing.  As always, to get the nitty-gritty detail of property names and fields sizes and the like, please refer to the actual documents that I’ll list as we navigate them.

Microsoft Open Specification Support Team Blog  MSG File Format (Part 1)

[MS-OXMSG]: .MSG File Format

image

This post, and part 2 when it comes out, warrant a much closer look (due to what I do in my “day life”)

 

Related Past Post XRef:
The Microsoft Office Visualization Tool (OffVis) – Spelunk (view, browse, peek into, etc) Microsoft Office Binary Format files

No comments: