eulcommon.binfile.outlookexpress – Outlook Express 4.5 for Mac

Map binary email folder index and content files for Outlook Express 4.5 for Macintosh to Python objects.

What documentation is available suggests that Outlook Express stored email in either .mbx or .dbx format, but in Outlook Express 4.5 for Macintosh, each mail folder consists of a directory with an Index file and an optional Mail file (no Mail file is present when a mail folder is empty).

class eulcommon.binfile.outlookexpress.MacFolder(folder_path)

Wrapper object for an Outlook Express 4.5 for Mac folder, with a MacIndex and an optional MacMail.

Parameters:folder_path – path to the Outlook Express 4.5 folder directory, which must contain at least an Index file (and probably a Mail file, for non-empty folders)
all_messages

Same as messages except deleted messages are included.

count

Number of email messages in this folder

messages

A generator yielding an email.message.Message for each message in this folder, based on message index information in MacIndex and content in MacMail. Does not include deleted messages.

raw_messages

A generator yielding a MacMailMessage binary object for each message in this folder, based on message index information in MacIndex and content in MacMail.

skipped_chunks = None

Number of data chunks skipped between raw messages, based on offset and size. (Only set after iterating through messages.)

class eulcommon.binfile.outlookexpress.MacIndex(fobj=None, mm=None, offset=0)

A BinaryStructure for the Index file of an Outlook Express 4.5 for Mac email folder.

MAGIC_NUMBER = 'FMIn'

Magic Number for Outlook Express 4.5 Mac Index file

header_length = 28

length of the binary header at the beginning of the Index file

messages

A generator yielding the MacIndexMessage structures in this index file.

total_messages

number of email messages in this folder

class eulcommon.binfile.outlookexpress.MacIndexMessage(fobj=None, mm=None, offset=0)

Information about a single email message within the MacIndex.

LENGTH = 52

size of a single message information block

offset

the offset of the raw email data in the folder data file

size

the size of the raw email data in the folder data file

class eulcommon.binfile.outlookexpress.MacMail(fobj=None, mm=None, offset=0)

A BinaryStructure for the Mail file of an Outlook Express 4.5 for Mac email folder. The Mail file includes the actual contents of any email files in the folder, which must be accessed based on the message offset and size from the Index file.

MAGIC_NUMBER = 'FMDF'

Magic Number for a mail content file within an Outlook Express 4.5 for Macintosh folder

get_message(offset, size)

Get an individual MacMailMessage within a Mail data file, based on size and offset information from the corresponding MacIndexMessage.

Parameters:
  • offset – offset within the Mail file where the desired message begins, i.e. MacMailMessage.offset
  • size – size of the message, i.e. MacMailMessage.size
class eulcommon.binfile.outlookexpress.MacMailMessage(size, *args, **kwargs)

A single email message within the Mail data file, as indexed by a MacIndexMessage. Consists of a variable length header or message summary followed by the content of the email (also variable length).

The size of a single MacMailMessage is stored in the MacIndexMessage but not (as far as we have determined) in the Mail data file, an individual message must be initialized with the a size parameter, so that the correct content can be returned.

Parameters:size – size of this message (as determined by MacIndexMessage.size); required to return data correctly.
DELETED_MESSAGE = 'MDel'

Header string indicating a deleted message

MESSAGE = 'MSum'

Header string indicating a normal message

as_email()

Return message data as a email.message.Message object.

content_offset

offset within this message block where the message summary header ends and message content begins

data

email content for this message

deleted

boolean flag indicating if this is a deleted message

header_type

Each mail message begins with a header, starting with either MSum (message summary, perhaps) or MDel for deleted messages.

Project Versions

Previous topic

eulcommon.binfile.eudora – Eudora email index files

Next topic

Change & Version Information

This Page