What Is a DBX File? Find the Kind, Then Open or Convert It
A DBX file is an Outlook Express mail folder saved as one file. Jump to your question below, or work through it in order.
What Is a DBX File? An Outlook Express mail folder, kept in one file
Short answer
A DBX file is an Outlook Express mail folder saved as one file. The Inbox, Sent Items and every folder you made got a DBX file of its own. The same ending is also used by AutoCAD add-ons and by Dropbox databases.
The first four bytes show which kind you have. An Outlook Express DBX file starts with cf ad 12 fe. In our 34 test DBX files, 32 still started that way. None of our files came from Outlook Express, so we tested readers and not the program.
We tried two readers on all 34 files. If your DBX file will not open, read the damage tests. To get the mail out as EML files, read the conversion steps. For any other case, start with the first-byte check.
A DBX file is an Outlook Express mail folder kept in one file. Outlook Express made a DBX file for the Inbox, one for Sent Items and one for every folder you added. The first four bytes show whether a DBX file is really that kind.
Picture an old Windows XP computer in a drawer, or backup folders from 2005. Inside is a folder called Outlook Express with DBX files named Inbox.dbx, Sent Items.dbx and Folders.dbx. Years of mail live in those DBX files, and nothing on a modern PC opens them with a double click.
Wikipedia says Outlook Express 5.0 switched to DBX files and used a separate file for every mailbox folder. Version 4.0 stored mail in .mbx files, a layout like the Unix mbox format. The same article says Outlook Express supported only DBX files under 2 GB, and that its database was often corrupted.
Microsoft's note on importing Outlook Express mail into Outlook says the same thing in simple words: the Inbox folder in Outlook Express is a single file, Inbox.dbx. FileInfo lists the ending as an Outlook Express e-mail folder and adds that the program is discontinued.
DBX file facts at a glance
| Property | Value |
|---|---|
| File extension | .dbx |
| Usual meaning | An Outlook Express e-mail folder, says FileInfo |
| Type | Binary database file, one for every mail folder |
| Made by | Outlook Express 5 and 6, says Wikipedia |
| Opens in | Outlook Express, DBX viewers and readers like undbx that save EML files |
| Layout | A header, an index tree and message text in 512-byte pieces |
| Size limit | Under 2 GB, says Wikipedia |
| Safe to open | Reading is low risk. It is old mail, so treat the attachments inside with care. |
| Other meanings | AutoCAD and Dropbox use the ending too. See the section on other uses. |
Wrong page? A single saved message ends in .eml, and the EML file guide covers it. A newer Outlook data file ends in .pst, and the PST file guide explains that one.
Which Kind of DBX File Is Yours? The first four bytes name the family
Read the first four bytes of your DBX file. If they are cf ad 12 fe, it is an Outlook Express file, and byte 5 says whether it is one mail folder or the folder list. Any other start means it is not that kind.
You need no special software. The short script below prints the start of a DBX file, the kind, the item count and the size check. Save it as check_dbx.py and give it the name of your DBX file.
import os, struct, sys
path = sys.argv[1]
size = os.path.getsize(path)
with open(path, "rb") as f:
head = f.read(0x100)
print("First 8 bytes:", head[:8].hex(" "))
if head[:4] != bytes.fromhex("cfad12fe"):
sys.exit("No Outlook Express signature, so this is not that kind of DBX file.")
kinds = {0xC5: "one mail folder", 0xC6: "the folder list", 0xC7: "account info", 0x30: "offline items"}
print("Holds:", kinds.get(head[4], "unknown"), "(byte 4 is %02x)" % head[4])
count = struct.unpack_from("<I", head, 0xC4)[0]
root = struct.unpack_from("<I", head, 0xE4)[0]
stated = struct.unpack_from("<I", head, 0x7C)[0]
print(f"Items in header: {count}. Index starts at byte {root}.")
print(f"Size in header: {stated} bytes. Size on disk: {size} bytes.")
python check_dbx.py inbox-3.dbx
First 8 bytes: cf ad 12 fe c5 fd 74 6f
Holds: one mail folder (byte 4 is c5)
Items in header: 3. Index starts at byte 13508.
Size in header: 13568 bytes. Size on disk: 13568 bytes.
We tried the script on all 34 test DBX files. It found the Outlook Express start in 32 and named the kind for 31. For 2 files it found no start, and for 1 it said the kind byte is unknown. The table shows the kinds of DBX files with how many every reader opened.
| Kind | Files | Normal | Recovery |
|---|---|---|---|
Mail folder (c5)
|
29 | 14 | 22 |
Folder list (c6)
|
2 | 0 | 1 |
Unknown (c9)
|
1 | 0 | 1 |
| No signature | 2 | 0 | 2 |
The Normal and Recovery columns count the DBX files from which undbx gave back at least one message in that mode. Folders.dbx has no messages, and one more DBX file was empty by design. Our DBX files are built, so a file from Outlook Express may not behave the same way.
Three more clues about your DBX file
file command, version 5.45 in our test, named 32 of the 34 files as Outlook Express DBX files and gave the item count. It repeats the size in the header, so it did not notice a cut-off copy.
What Is Inside DBX Files? A header, an index and message text in 512-byte pieces
An Outlook Express DBX file has a header, an index tree and message text in 512-byte pieces. The header gives the item count and where the index starts. A message is a chain of pieces, and every piece points to the next one.
Think of a filing cabinet with a card index. The front card says how many files are inside and where the index drawer is. The index cards point to the folders, and the folders are made of sheets that are all the same size. DBX files are built much the same way.
We read the layout from the source code of undbx, then built files to that layout and checked that two readers return our messages byte for byte. That proves our files match what those readers expect. It does not prove that Outlook Express writes the same bytes.
| Part | Position | What it has |
|---|---|---|
| Signature | Bytes 0 to 3 |
cf ad 12 fe
|
| Kind | Byte 4 |
c5 for one mail folder, c6 for the folder list
|
| Size | Bytes 124 to 127 | The size of the file, as the header states it |
| Item count | Bytes 196 to 199 | How many messages or folders the index lists |
| Index start | Bytes 228 to 231 | Where the index tree begins |
| File info | After the header | A 384-byte block with the folder name |
| Pieces | From byte 9,788 in our files | Message text, 512 bytes at a time |
The header takes 9,404 bytes in every DBX file we built, so a small DBX file is mostly header. A piece takes 528 bytes. Its first 16 bytes give its own position, the length 512, the length used and the position of the next piece. Then comes up to 512 bytes of message text.
How a message is stored
Our second test message is 556 bytes long. The reader finds it through the index, reads 512 bytes from the first piece, follows the pointer to the second piece and reads the last 44 bytes. The message text is kept as it arrived, so DBX files contain ordinary mail headers, text and attachments.
A larger message has a longer chain. Our biggest message was 411,177 bytes and needed 804 pieces. An attachment is part of that text, written in base64, so it also lives in the chain.
What a deleted message leaves behind
When a message is deleted, its pieces stay in the DBX file and are only marked. The Kali page for undbx says the program can recover messages from deleted-item pieces that have not been overwritten. We built a DBX file with 5 messages and marked 2 as deleted. The normal mode of undbx returned the 3 live messages, and recovery mode also returned the 2 deleted ones, as the damage test results show.
A small detail we saw. Recovery mode brought both deleted messages back with 4 bytes changed in every piece. That is 40 bytes in a message of 4,911 and 24 in a message of 2,961. We built the deleted pieces the way the undbx code describes them. So this shows that the code behaves as written. We cannot say how Outlook Express itself marks them.
What Do 34 Test DBX Files Show? 8 good files, 26 copies we broke or renamed and two readers
We tested 34 DBX files: 8 good ones we built, 21 damaged copies, 4 renamed copies and 1 untouched control. In normal mode, undbx saved every message from 2 of the 21 damaged copies. Recovery mode did it for 12.
We found no public set of DBX files from Outlook Express to test, and mail files contain private mail, so few people share them. So we built our own to the layout in the undbx source code. Then we broke copies of them in 21 ways and tried two readers on all 34 files.
The readers were undbx 0.21 and java-dbx, a Java library, which we compiled without its message-parsing step. We also used the file command 5.45 and one Linux machine. We built and tested everything in October 2026.
We did not test Outlook Express, Windows Mail, Windows Live Mail, Outlook, the SysTools or Freeviewer viewers, a 2 GB file or any DBX file made by Microsoft software. Files built from the layout that two readers parse show that the readers agree with our files. They show nothing about the files Outlook Express wrote.
The 8 good DBX files we built
| File | What it has and tests |
|---|---|
| inbox-3 | 3 short messages, 13,568 bytes. Tests the base case. |
| inbox-long | Messages of 12, 70 and 600 lines, 57,920 bytes. Tests chains of pieces. |
| inbox-attach | Two messages with 30,000 and 300,000 byte attachments. Tests attachments. |
| inbox-accents | Accented subjects and a windows-1252 body. Tests letters. |
| inbox-600 | 600 short messages, 444,380 bytes. Tests size and the index tree. |
| inbox-deleted | 5 messages, 2 of them deleted. Tests deleted mail. |
| inbox-empty | A mail folder with no messages. Tests zero messages. |
| Folders.dbx | A folder list with 6 folders. Tests the master file. |
Both readers returned 614 of 614 live messages from the six good files that have messages, byte for byte. The attachments came back identical, and Python parsed all 600 extracted messages from the large file. undbx needed 0.02 seconds for those 600 short messages.
The 26 copies we broke or renamed
We made 21 damaged copies of the good DBX files, one kind of damage in every copy. We also saved 4 renamed copies of one good DBX file as .eml, .mbx, .dat and .txt, and kept 1 untouched copy as a control. The damage tests below list all 21.
| Damage (copies) | Normal | Recovery | java-dbx |
|---|---|---|---|
| Cut short (4) | 0 | 0 | 0 |
| Header numbers (5) | 1 | 5 | 1 |
| Signature, kind (4) | 0 | 4 | 0 |
| Message pieces (5) | 0 | 1 | 0 |
| Index, tail (3) | 1 | 2 | 1 |
| All 21 copies | 2 | 12 | 2 |
Saved in full means every message came back byte for byte. Normal mode follows the index, so it saved nothing at all from 14 of the 21 copies. Recovery mode scans the DBX file for message pieces, and it saved something from 19.
Messages saved, not only files
The 19 damaged copies of the small DBX file contain 57 messages. Normal mode saved 16 of them byte for byte, recovery mode saved 45 and java-dbx saved 10. For the two copies of the 600-message file, normal mode saved none. Recovery mode saved 898 of the 1,200 messages.
The 4 renamed copies split the readers. The tool undbx skipped all 4 in both modes, because it accepts only names that end in .dbx. Both java-dbx and the file command read all 4, because they look inside the DBX file. Rename your copy back to .dbx before you give it to undbx.
cf ad 12 fe, and the file command named the same 32.
Read the counts with care. We broke our own small DBX files with simple damage. Damage from a failing disk or a crash is messier, and DBX files from Outlook Express can reach 2 GB. The numbers show how two readers behave with these files, and they are not rates for all DBX files.
What Does Our Expert Say About DBX Files? A note from Neeraj Singh on working from a copy
Copy the folder, extract the mail to EML files and check the letters and the attachments. Keep the original DBX files untouched. Try normal mode first and move to recovery mode only if it fails.
Expert insight
“A DBX file is one mail folder, and Outlook Express wrote a separate file for every folder. In our test, undbx saved all the messages from 2 of 21 damaged copies in normal mode and from 12 in recovery mode. So start with a copy, not a repair. Extract the mail to EML files, then check the letters and the attachments. Keep the original DBX files untouched.”
Why a quiet result can still be wrong
undbx finished with exit code 0 on all 14 damaged DBX files where normal mode saved nothing. A script that checks only that code would call the job done. Count the EML files instead, and compare the number with the item count that the check script prints.
Recovery mode can add files too. For 4 damaged DBX files it returned 4 files from 3 messages, because leftover pieces of a cut message came back as an extra file. The file command had a similar blind spot: it repeated the size in the header and described our cut-in-half copy as a full 57,920 bytes.
Keep the original. Work on a copy of the entire mail store and keep Folders.dbx beside the other DBX files. The Folders.dbx section shows what the master file does. Convert with the steps in the conversion section.
How Do You Open DBX Files? A viewer, a command-line reader or Outlook Express
Open your DBX file with Outlook Express if you still have it, with a DBX viewer or with a reader like undbx that saves EML files. On a modern PC a reader is the safest start. Always work on a copy of the folder.
The newer Microsoft mail programs do not use DBX files. A Microsoft Q&A answer says Windows Live Mail keeps messages as .eml files in folders. It adds that the Windows 10 Mail app has no way to export its local storage. So DBX files need a program made for them.
| Program | What it does | What we saw |
|---|---|---|
| Outlook Express | Its own program, now discontinued, says FileInfo | Not tested |
| Windows Live Mail | Listed by FileInfo for DBX files. SysTools describes an import on an older computer. | Not tested |
| SysTools DBX Viewer | A Windows viewer with eight preview modes | Not tested |
| Freeviewer DBX viewer | A Windows viewer with preview and sorting | Not tested |
| undbx | A command-line reader that saves messages as EML files | 614 of 614 live messages |
| java-dbx | A Java library for programmers | 614 of 614 with the right encoding |
Open DBX files with Outlook Express
If an old computer still has the program, copy the entire Outlook Express store folder before you touch anything. Microsoft's note on importing mail into Outlook covers two computers. It says you copy the store folder to the new one and point Outlook Express at it before the import. We did not test this.
Free viewers and reference pages
These four links open outside pages: two viewers, a guide that ends in a paid tool and Microsoft's note on moving the mail.
SysTools DBX Viewer
View DBX files without Outlook Express
Convert DBX to EML
A SysTools guide with manual and paid routes
Import into Outlook
Microsoft's note on moving Outlook Express mail
SysTools lists a Windows viewer with eight preview modes: Normal, Hex, Properties, Message Header, MIME, HTML, RTF and Attachments. Its page says viewing is free and that search, selective export, PDF export and printing need the Pro edition. It names PDF and print as the export routes and does not name EML. We did not test it.
Freeviewer's page describes a viewer for Outlook Express DBX files, including Folders.dbx. It lists a preview pane, sorting, attachment viewing and the original folder tree in the free edition. It puts search, PDF export, printing and duplicate removal in the Pro edition. Its FAQ names Outlook Express versions 4.1, 5.0, 5.5 and 6.0, and the page does not mention damaged files. We did not test it either.
Open DBX files with undbx
The Kali Linux tools page for undbx says it extracts, recovers and undeletes messages from DBX files, and lists version 0.21. We installed it with apt-get on Linux. It takes one DBX file or one folder, and an output folder.
undbx Inbox.dbx output
undbx --recover Inbox.dbx output
undbx --safe-mode Inbox.dbx output
The first command saves every message as an EML file in a folder named after the DBX file. The second adds recovery mode. The third names the files by their position in the DBX file, like 0000263C.eml, which is safe on any system. When we gave undbx a folder, it handled every DBX file in it and skipped Folders.dbx with a note that the DBX file has no messages.
On the six good files with messages, undbx returned 614 of 614 live messages byte for byte. The 600-message file took 0.02 seconds. The two attachments, of 30,000 and 300,000 bytes, came back identical to the originals.
Open DBX files with java-dbx
java-dbx is a Java library with a reader class. It parses message text with a mail library that we could not download, so we removed that step and tested only how it reads the DBX file. It returned 614 of 614 live messages once we set the Java file encoding to ISO-8859-1. The letters section shows why that setting matters.
Can You Read a DBX File in a Text Editor? Partly, and a header cuts the text every 512 bytes
You can read much of a DBX file in a plain text editor, because messages are stored as they arrived. But a 16-byte piece header lands inside the text every 512 bytes. In our longest files, about 1 line in 8 was cut by one.
Open your DBX file in a text editor and most of it looks like noise: the header, the pointers and the index. Scroll on and you find the message headers and text. A quick look needs only a text editor that copes with null bytes.
Line 0002 of msg1: the quick brown fox jumps over the lazy dog.
Line 0003 of msg1: thL(..........\*..e quick brown fox jumps over the lazy dog.
The 16 bytes in the middle are the header of the next piece. They split the word the into th and e. Every message longer than 512 bytes has breaks like this, so a word, an address or a line of an attachment can be cut.
| Part | Shows as | Note |
|---|---|---|
| Header | Noise | Counts, pointers and zero bytes |
| Message headers | Readable | From, To, Subject and Date lines |
| Message text | Readable | Cut by 16 bytes every 512 bytes |
| Attachments | Unreadable | Base64 letters and numbers |
| Index | Noise | Pointers and no text |
| Accents | It depends | Raw bytes or encoded words |
We counted the lines that stayed unbroken. In our long DBX file, 625 of 709 lines were intact, which is 88 percent. In the DBX file with attachments, 4,963 of 5,825 lines were intact, which is 85 percent. In the 600-message file, every one of the 6,600 lines was intact, because every message is shorter than a piece.
Look, do not save. Use a text editor to read your DBX file and not to save it. We did not test saving, and the header and the index depend on exact byte positions.
What Are Folders.dbx and the Other Files Beside a DBX File? One master file, one file for every folder and a few helpers
Folders.dbx is the master file. It stores the tree of mail folders, and the other DBX files contain the mail. Keep them together in one folder. In our test, undbx saved the mail without Folders.dbx.
ForensAfe calls Folders.dbx the master index that stores the tree of the other mail folders, and says Outlook Express needs it to work. It lists Offline.dbx and Pop3uidl.dbx as default mail folder files, and Cleanup.log as a file made when maintenance is on. It gives no more detail on them.
| Name | What it is | Source |
|---|---|---|
Folders.dbx
|
The master list of mail folders | ForensAfe |
Inbox.dbx
|
The Inbox as a single file | Microsoft's import note |
Sent Items.dbx
|
Sent mail, with Drafts and Deleted Items beside it | ForensAfe |
Offline.dbx Pop3uidl.dbx
|
Default files that the program creates | ForensAfe |
Cleanup.log
|
A log made during upkeep | ForensAfe |
On Windows XP, ForensAfe puts the folder at the path below, with a GUID for the identity. Copy the entire folder and not a single file.
C:\Documents and Settings\%username%\Local Settings\Application Data\Identities\{GUID}\Microsoft\Outlook Express
What happened to our mail without Folders.dbx
We tried undbx on one DBX file alone, and on a folder with Folders.dbx and two DBX files.
| Test | Result |
|---|---|
| One DBX file alone | All 3 messages saved |
| A folder with Folders.dbx and 2 mail files | All 6 messages saved, and Folders.dbx skipped |
| Names of the output folders | Taken from the DBX file names |
undbx named every output folder after its DBX file and ignored the folder names stored in Folders.dbx. So keep the original file names. They are how you match the EML files to the folders you remember.
Copy them together. When you move or back up a mail store, move Folders.dbx and every DBX file with it. A lone Inbox.dbx still gives you the mail, as our test shows, but the folder tree needs the master file.
Why Do Letters Look Wrong in DBX Mail? The message names its code page, and the reader must follow it
A DBX file stores messages as the bytes that arrived, so the letters depend on the code page that the message names. Save the bytes unchanged, then read them with the right code page. In our test, java-dbx at its default setting lost the accents.
Email text is a stream of bytes, and the message header names the code page that maps bytes to letters. Our accent file has three messages in windows-1252, the old Western European code page for Windows, with subjects written as UTF-8 encoded words. In windows-1252 the byte e9 is the letter é.
The DBX file does not change those bytes. undbx saved them as they were and matched all 3 originals. The table shows what the same body line looks like when a program guesses the code page wrong.
| Read as | Why | Result |
|---|---|---|
| Python email module | Reads the charset in the header | Café crème brûlée |
| windows-1252 | The code page the message names | Café crème brûlée |
| UTF-8 | Wrong guess | Caf� cr�me br�l�ee |
| cp850 | Wrong guess | CafÚ crÞme br¹lÚe |
| cp1251 | Wrong guess | Cafй crиme brыlйe |
The Python email module read the charset from the header and got the line right. A UTF-8 reader showed replacement symbols, and the other two guesses showed the wrong letters.
The reader that lost the accents
| Reader | Messages right |
|---|---|
| undbx, normal mode | 3 of 3 |
| undbx, recovery mode | 3 of 3 |
| java-dbx, default setting | 0 of 3 |
| java-dbx, ISO-8859-1 | 3 of 3 |
At its default setting, our Java machine read the DBX file as UTF-8. Every accented byte became a replacement symbol while the DBX file was read, so the text no longer matched the original, and the output cannot bring the accents back. With the Java file encoding set to ISO-8859-1, which keeps every byte, all 3 messages matched.
Fix wrong letters in four steps
- Save the messages with a reader that keeps the bytes, like undbx, and not with one that decodes them.
- Open one EML file in a text editor and find the line that starts with Content-Type. It names the charset, like windows-1252.
- Open the EML file in a mail program or script that reads that charset, like the Python email module.
- If the letters still look wrong, try the other code pages in the table, starting with windows-1252 for old Western European mail.
A trap in the subjects. Our subjects used UTF-8 encoded words, written like =?utf-8?B?...?=. They look like noise in a text editor and decode to normal letters in a mail program. Do not read them as damage.
Why Will Your DBX File Not Open? Twenty-one damage tests, and fixes that took a few bytes
A DBX file that will not open usually has a damaged header, a cut-off end or a broken index. In our tests, recovery mode saved all messages from 12 of 21 damaged copies, and one header fix brought 6 copies back in normal mode.
Most failures come from a mismatch between the DBX file and the reader. We broke copies of two good DBX files in 21 ways, one kind of damage in every copy, and tried undbx in two modes and java-dbx. The chart shows who saved what.
Fix the header values of a DBX file
Six of our damaged DBX files had a good body and one wrong header value. We set the value back and tried normal mode again. Every one then saved 3 of 3 messages byte for byte. We also broke the signature, the kind byte and the count in one copy, and the three fixes below saved all 3 messages.
| Damage | Sign | Fix |
|---|---|---|
| Signature |
Byte 0 is not cf
|
Set byte 0 to cf
|
| Kind byte |
Byte 4 is c6 or c9 on a mail file
|
Set byte 4 to c5
|
| Item count | The header says 0 items | Set bytes 196 to 199 to a number above the true count |
| Index start | Bytes 228 to 231 are 0 or past the end | No safe fix by hand, so use recovery mode |
| Cut short | The size on disk is below the size in the header | No fix, so use recovery mode for what is left |
| Cut in the header | Under 9,404 bytes | No fix |
data = bytearray(open("broken.dbx", "rb").read())
data[0] = 0xCF # signature
data[4] = 0xC5 # one mail folder
data[196:200] = (1000).to_bytes(4, "little") # item count
open("fixed.dbx", "wb").write(data)
Work on a copy, and read the header again with the header check script after the fix. A count of 4,294,967,295 saved nothing in our test, so choose a number near the true count and not the largest one.
Use recovery mode when a fix is not possible
Recovery mode ignores the index and scans the DBX file for message pieces. That is why it saved all 3 messages from a copy with a zeroed index start, a zeroed index node or a broken signature. It cannot rebuild a message whose pieces are gone, so a cut copy gives only what is left.
undbx --recover Inbox.dbx output
Two cautions come from our results. Recovery mode puts messages found in deleted pieces in a folder called deleted, so check that folder before you count. It also returned 4 files from 3 messages for 4 of our copies, because the leftover pieces of a cut message came back as an extra file.
SysTools says on its page that its viewer opens corrupted DBX files, and does not say how it does so. Freeviewer's page does not mention damaged files. We tested neither.
Compare counts. Match the number of EML files with the item count that the check script prints. A shortfall means missing mail. One extra file may be a leftover piece. Keep the original DBX file as it is.
How Do You Convert DBX Files to EML? One command with undbx, then three checks
Convert DBX files to EML with undbx, then check the count, the letters and the attachments. EML files open in many mail programs. Keep the original DBX files untouched.
You have three routes: a command-line reader, a converter program or an import through an old mail program. The table lists what we tested and what we only read about.
| Route | Tool | Result |
|---|---|---|
| DBX to EML | undbx, normal mode | 614 of 614 live messages byte for byte |
| DBX to EML | undbx, recovery mode | The same, plus the 2 deleted messages with 4 bytes changed in every piece |
| DBX to EML | Windows Live Mail | Described by SysTools. Not tested. |
| DBX to EML | SysTools DBX Converter | Described on its page. Not tested. |
Convert with undbx
undbx Inbox.dbx output
undbx --safe-mode Inbox.dbx output
Normal mode names every EML file from the sender, the recipient and the subject, plus two numbers. Safe mode names it by its position in the DBX file, like 0000263C.eml. Safe mode is the easier choice for big folders, because long subjects make long file names.
A DBX file is a single mail folder, so you get one output folder for every DBX file. In our 600-message test, undbx wrote 600 EML files, and Python parsed all 600 with a subject. The two attachments came back at 30,000 and 300,000 bytes, identical to the originals.
Check the EML files
import email, glob
from email import policy
for path in sorted(glob.glob("output/*/*.eml")):
with open(path, "rb") as f:
msg = email.message_from_binary_file(f, policy=policy.default)
print(msg["Subject"], len(list(msg.iter_attachments())))
What to do with the EML files
An EML file is one message, and the guide to opening EML files shows how to open it. If your new mail program wants one mailbox file, read the MBOX file guide. For Outlook, the guide to Outlook PST data files explains its data file.
The SysTools guide describes two manual routes, through Windows Live Mail and through Thunderbird, and says they suit small files. It warns that manual routes can truncate attachments and flatten folders. We did not test those routes or its converter.
What Else Uses the DBX Ending? AutoCAD files, Dropbox databases and newer mail programs
The .dbx ending covers Outlook Express mail folders, AutoCAD files and encrypted Dropbox databases. Name the source before you choose a program, because the kind sets what opens the DBX file.
FileInfo's list of .dbx meanings names three for .dbx: an Outlook Express e-mail folder, an AutoCAD database extension file and a Dropbox encrypted database. Only the first is mail. The table adds the older mail layout that Wikipedia names.
| Kind | Made by | Note |
|---|---|---|
| Outlook Express folder | Microsoft |
Starts with cf ad 12 fe in our files
|
| AutoCAD file | Autodesk | An extension file, says FileInfo |
| Dropbox database | Dropbox | Encrypted, says FileInfo |
| Outlook Express 4 folder | Microsoft | Stored in .mbx files, says Wikipedia |
The DBX file in a Dropbox folder
FileInfo says a Dropbox DBX file contains an encrypted database used by Dropbox. A 2013 Forensic Focus article says Dropbox began to encrypt its file cache in early 2012 and renamed filecache.db to filecache.dbx. It says a decryption tool then needed the DBX file, the Protect folder of the user, a registry value and the Windows password. It worked only for Windows XP or Vista.
So a DBX file from Dropbox is not mail, and you cannot read it by hand. Leave it for Dropbox. We did not test this kind.
The DBX file from AutoCAD
FileInfo describes the AutoCAD kind as an extension file used by AutoCAD, an engineering and design program, and names Autodesk AutoCAD as the program for it. A DBX file that came with AutoCAD or one of its add-ons belongs to that software. For drawings, the guide to AutoCAD DWG drawings covers the usual file.
Newer Microsoft mail programs
A DBX file is not what Windows Live Mail writes. The Microsoft Q&A answer on Live Mail says it keeps .eml files in folders. If you find .eml files in a Windows Live Mail folder, they are single messages, and you can open them as the section on opening files explains.
What Is the DBX File Format Made Of? The header facts, and what we could check
We found no public standard for DBX. These are the facts we could check against Wikipedia, Microsoft, FileInfo, ForensAfe and our own 34 DBX files.
| Item | What we could check |
|---|---|
| Name | Outlook Express e-mail folder, says FileInfo |
| Extension | .dbx |
| Maker | Microsoft. Outlook Express 5.0 switched to DBX files, says Wikipedia. |
| Status | We found no Microsoft specification. We read the layout from the undbx source code. |
| Signature |
cf ad 12 fe, then byte 4: c5 for one mail folder and c6 for the folder list
|
| Header | 9,404 bytes in the files we built |
| Counts | Size at byte 124, item count at byte 196 and index start at byte 228 |
| Pieces | 528 bytes: a 16-byte header and up to 512 bytes of message text |
| Deleted mail | The pieces stay in the file and are marked. Recovery mode can find them. |
| Size limit | Outlook Express supported DBX files under 2 GB, says Wikipedia |
| Companions | Folders.dbx is the master file. Offline.dbx and Pop3uidl.dbx are default files. |
| Text editor | Partly readable. A piece header cuts the text every 512 bytes. |
About header values we do not list
Our files also set version numbers and segment sizes in the header. We took those values from the undbx code, and we could not check them against a file from Outlook Express. So the facts table lists only the values that the two readers use to find the mail.
What we left out
We did not test Outlook Express, Windows Mail, Windows Live Mail, Outlook or Thunderbird. We did not test a DBX file over 2 GB, a newsgroup folder, an Outlook Express 4 .mbx file or any file that Microsoft software wrote. All 34 of our files came from our own scripts.
We did not test the SysTools or Freeviewer viewers or the SysTools converter. What we say about them comes from their pages. We name no prices, because the pages gave none we could check.
Our damage tests are simple breaks in small files. We tested two readers, and other readers may behave differently. The numbers in this guide show how those two behaved, and they are not rates for all DBX files.
Sources checked
For history, the 2 GB limit and the corruption problem, see Wikipedia's Outlook Express article. For the single-file-per-folder fact, see Microsoft's import note. For the other meanings of the ending, see the FileInfo entry for .dbx and the Forensic Focus article on Dropbox.
For Folders.dbx and its companions, see the ForensAfe page on Outlook Express. For the newer Microsoft programs, see the Microsoft Q&A answer on mail storage. For undbx, see the Kali tools page. Every test count came from the 34 DBX files and the scripts in our research folder.
Frequently Asked Questions About DBX Files
What is a DBX file?
It is the file Outlook Express used to store one mail folder. Your Inbox lived in Inbox.dbx and your sent mail in Sent Items.dbx. An Outlook Express DBX file starts with the bytes cf ad 12 fe. Reading a DBX file is low risk, but the old mail inside may contain attachments you should not open.
Which program makes DBX files?
Outlook Express makes them. Wikipedia says Outlook Express 5.0 switched to DBX files and used a separate file for every mailbox folder, and that version 4.0 used .mbx files. The ending is also used by AutoCAD and by Dropbox, so check the first bytes before you decide.
How do I open a DBX file?
Copy the folder first. Then open the DBX file in Outlook Express if you still have it, in a DBX viewer, or with a reader like undbx that saves EML files. In our test, undbx returned 614 of 614 live messages byte for byte from six good files. We did not test the viewers or Outlook Express.
Can Outlook open a DBX file?
Not with a double click. Microsoft has a note on importing Outlook Express mail into Outlook, with steps for one computer and for two. We did not test it. The safer route is to extract EML files from the DBX file first, then bring them into the program you use now.
Do Windows Mail and Windows Live Mail use DBX files?
A Microsoft Q&A answer says Windows Live Mail keeps messages as .eml files in folders, and that the Windows 10 Mail app has no way to export its local storage. FileInfo still lists Windows Live Mail among the programs for DBX files, and SysTools describes importing through its Outlook Express 6 option. We tested none of them.
How do I convert a DBX file to EML?
Use undbx with a command like undbx Inbox.dbx output. It saves every message as an EML file in a folder named after the DBX file. Add --safe-mode for file names based on position. Then compare the number of EML files with the item count in the header, and check the letters and the attachments.
Can I read a DBX file in a text editor?
Partly. Message headers and text are stored as they arrived, so you can read them. But a 16-byte piece header lands inside the text every 512 bytes. In our long test file, 88 percent of the lines stayed unbroken. Attachments are base64 text, so they are not readable. Do not save the file from an editor.
Why will my DBX file not open?
The usual causes are a changed ending, a damaged header, a cut-off end or a broken index. In our tests, undbx in normal mode saved all messages from 2 of 21 damaged copies and recovery mode from 12. Setting a wrong signature, kind byte or item count back fixed 6 copies in normal mode. A copy cut inside the header gave nothing.
Why do accents look wrong after I convert DBX mail?
The reader or the program guessed the wrong code page. A DBX file keeps the bytes that arrived, and the message header names the code page. In our test, java-dbx at its default setting replaced accented bytes with replacement symbols, and undbx kept them. Read the charset in the Content-Type line and open the EML file with that code page.
Can I recover deleted mail from a DBX file?
Sometimes. Deleted messages leave their pieces in the DBX file, and undbx in recovery mode found both deleted messages in our test file. They came back with 4 bytes changed in every piece, because we built the file to that layout. We cannot say how Outlook Express itself marks deleted mail, so treat recovered mail as a draft copy.
What is Folders.dbx?
Folders.dbx is the master file of an Outlook Express store. ForensAfe says it stores the tree of the other mail folders and that Outlook Express needs it. In our test, undbx skipped it with a note that it has no messages, and saved the mail from the other DBX files. Keep it beside them when you back up.
Is a DBX file from Dropbox or AutoCAD a mail file?
No. FileInfo says a Dropbox DBX file contains an encrypted database and an AutoCAD DBX file is an extension file. Neither is mail. Read the first four bytes: an Outlook Express file starts with cf ad 12 fe. Leave the other kinds for the program that made them.
Still Stuck With a DBX File? Eight routes out, depending on what went wrong
Start with the damage test grid. The signature, the kind byte and the item count explain most cases, and recovery mode covers the rest.
Go to the undbx steps. One command writes an EML file for every message.
Is it a single saved message? The EML email message guide shows how to open one.
Is it an Outlook data file? The PST Outlook data file guide explains the newer mail store.
Is it an Outlook message? The MSG Outlook message guide covers a single message saved by Outlook.
Is it a drawing file? The DWG drawing file guide explains the usual AutoCAD file.
Is it a generic data file? The DAT data file guide explains how to read the first bytes of a file with an unclear name.
Is it a file type you do not know? Browse the file extension resource library, or send it to us on the submit a file type page.