Last modified by Farooq Sheikh on 2019/10/11 06:07

What is an EMLX file?

The EMLX file format is implemented and developed by Apple. The Apple Mail application uses the EMLX file format for exporting the emails. There are other applications as well that can open the EMLX files and convert these to other file formats. 

Brief History

Mac OS X operating system adopted the existing email program, NeXTMail, created by NeXT as part of the NeXTSTEP operating system. Apple after acquiring NeXT uplifted its features and it became the now Apple Mail email application to be used as default mail client. Emails exported via Apple Mail are directly saved as EMLX files. In addition, it is the default mail client for EMLX files when someone opens these by double-clicking on Mac OS.

EMLX File Format

EMLx files are simple text based files that can be opened in any text editor like Notepad. The EMLX file structure consists of three parts:

  • A byte count for the message - Length of the message itself, written in ASCII in decimal, terminated by 0x0a
  • The message itself
  • Message Metadata in the form of XML plist

These can be better explained with the help of following sample email extracted from Apple Mail as EMLX and opening in a text editor.

X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ******.*********.***
X-Spam-Status: No, score=-3.2 required=4.2 tests=BAYES_00,RP_MATCHES_RCVD,
        SPF_PASS,TVD_SPACE_RATIO autolearn=ham version=3.3.2
Received: from [] (******.*********.*** [***.**.**.**])
        by ******.*********.*** (8.14.5/8.14.5) with ESMTP id r2TN8m4U099571
       for <****@*********.***>; Fri, 29 Mar 2013 19:08:48 -0400 (EDT)
        (envelope-from ****@*********.***)
Subject: very simple
From: Sender <****@*********.***>
Content-Type: text/plain; charset=us-ascii
Message-Id: <4E83618E-BB56-404F-8595-87352648ADC7@*********.***>
Date: Fri, 29 Mar 2013 19:09:06 -0400
To: Reciever <****@*********.***>
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v1283)
X-Mailer: Apple Mail (2.1283)

message Foo

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
       <string>very simple</string>

In this example, the 875 shows the total length of message. The message metadata is enclosed in the <plist> tags and the flags are as described as follow:

0read1 << 0
1deleted1 << 1
2answered1 << 2
3encrypted1 << 3
4flagged1 << 4
5recent1 << 5
6draft1 << 6
7initial (no longer used)1 << 7
8forwarded1 << 8
9redirected1 << 9
10-15attachment count3F << 10 (6 bits)
16-22priority level7F << 16 (7 bits)
23signed1 << 23
24is junk1 << 24
25is not junk1 << 25
26-28font size delta7 << 26 (3 bits)
29junk mail level recorded1 << 29
30highlight text in toc1 << 30

See Also


Created by Kashif Iqbal on 2019/09/10 02:58