Version 0.6

July 5, 2006

  1. Copyright & Disclaimer
  2. History
  3. E-mail
  4. Summary
  5. Downloading
  6. Installation
  7. Usage - Batch Files
  8. Usage - DOS Prompt
  9. Corrupted mailbox.bdb
  10. Corrupted mailbox.atr
  11. Help, Bugs, Suggestions or Feature Requests
  12. Outlook and Outlook Express
  13. Issues Resolved
  14. TODO
  15. MBOX Format
  16. Juno 5.0 Mailbox Format

Copyright © 2003–2006 Larry Cook
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Version 0.6July 5, 2006Options for input/output dirs and to fix BDB
Version 0.5June 25, 2003Extract from BDB only, other fixes
Version 0.4May 15, 2003Bug fix for missing Subject/Sender/Timestamp
Version 0.3May 15, 2003First public release
Version 0.2May 12, 2003Second release for beta testing
Version 0.1May 8, 2003Initial release for beta testing


For help with this program, you may send an e-mail to:
j u n o 5 b d b [atsymbol] e p h e m e r a l e u p h o r i a |dot| com


juno5bdb is a utility that can extract Juno 5.0 email folders and messages to text files. Each file represents a folder and contains the messages for that folder in a digest-type format. While these output files follow the MBOX format, which is used by Eudora, Netscape, and Mozilla, they can also be imported back into Juno 5.0, Juno 4.0, or Juno 1.49 as well. Other mail clients like Outlook and Outlook Express can import from Eudora and Netscape.

juno5bdb will create a sub-directory called 'mbox' in which it will create an MBOX file for each Juno folder. Each MBOX file will contain the messages for that folder. As each folder is processed, the Juno folder name, the MBOX file name, and the number of messages copied will be printed on the screen. See the section 'Standard MBOX Format' below for an explanation of the MBOX format.

Since the files created by juno5bdb are just plain text files, you should be able to view them in any editor or word processor.


Download juno5bdb version 0.6 in zip format, and unzip using a utility such as 7-zip, WinZip or the built-in utilities in your operating system.


Perform the following steps in preparation for running juno5bdb:

  1. Create a new 'working' directory (aka folder). Be sure to make note of the path to this directory.
  2. Unzip 'juno5bdb.zip' to the new directory. This will place the files juno5bdb.exe, README.txt, and some .bat files in your new directory.
  3. Copy, don't move, the 'mailbox.atr' and 'mailbox.bdb' files from your Juno USERxxxx directory to this new directory. (While juno5bdb doesn't modify your Juno files, better to be using a copy in a new directory to be safe.)

Now you are ready to run juno5bdb to extract your email messages.

Usage - Batch Files

juno5bdb does not have a graphical user interface (GUI), so it must be run from the DOS prompt.

For those of you with an aversion to the DOS prompt, the following batch files are provided on which you can just double-click:

Usage - DOS Prompt

For those of you comfortable with the DOS prompt, the following instructions will give you an overview of the command line options.

First you must open an 'MS-DOS Prompt' window. You can locate the MS-DOS prompt program from the Taskbar in the "Start/Programs" menu. Then you must change to the new directory you created when you installed juno5bdb. To do this, type:

cd <path to the new directory>

For example, if the new directory is C:\junotools, then type:

cd C:\junotools

juno5bdb requires at least one command line option to run. If no option is given, then an explanation of the command line options will be printed to the screen.

To get MBOX files for importing to Juno 1.49, type:

juno5bdb -mbox -ext=txt

To get MBOX files for importing to Juno 4.0 or Juno 5.0, type:

juno5bdb -mbox -ext=frm

To get MBOX files for Eudora, type:

juno5bdb -mbox -ext=mbx

To get MBOX files for Netscape or Mozilla, type:

juno5bdb -mbox

For Outlook and Outlook Express, see the section 'Outlook and Outlook Express' below for detailed instructions.

To get a dump of the raw key/data pairs so you can process them yourself, or to open them in an editor or word processor for viewing, type:

juno5bdb -dump

This will create the files 'dump_atr.txt' and 'dump_bdb.txt'. If you want a better understanding of the Juno 5.0 file format, see the section 'Juno 5.0 Mailbox Format' below.

To get the version of juno5bdb, type:

juno5bdb -version

Corrupted mailbox.bdb file

The mailbox.bdb file may become corrupted if Juno or the computer crashes. If you know your file is corrupted or if juno5bdb just sits there for five minutes or more, then run it with the -fix option and then try again with the -mbox option.

The program only fixes some of the corruption, and then only well enough that juno5bdb should be able to run. It may not fix the corruption completely enough for Juno to be able to run. If you still want to use Juno, then it would be best to extract the mail with juno5bdb and then import it back into Juno.

Corrupted mailbox.atr file

The mailbox.atr file may also become corrupted if Juno or the computer crashes. The -fix option cannot fix corruption in the mailbox.atr file. If after using the -fix option you are still experiencing problems, or are not getting all of your email messages extracted, then try moving or renaming your mailbox.atr file so that juno5bdb cannot find it. This will result in a single MBOX file that will contain all of the email messages that exist in the mailbox.bdb file, not just the ones listed in the mailbox.atr file. (Note: This will also include email messages that you recently deleted, but that Juno has not yet purged from the mailbox.bdb file.)

Help, Bugs, Suggestions, or Feature Requests

If you need help, find a bug, or have suggestions or feature requests, please use the Juno_accmail email list. Joining the list is the best way to get help from a community of Juno users. If you are not already subscribed, please send email to info@junoaccmail.org for information about the list and instructions on how to subscribe. By using the list you stand to get answers faster. Also the questions and responses will be shared with others as well as archived for future reference.

If you prefer not to be on the Juno_accmail email list, then you can email
j u n o 5 b d b [atsymbol] e p h e m e r a l e u p h o r i a |dot| com, which will forward your message to the author and a few others familiar with the program.

Outlook and Outlook Express

Both of these mail clients use a Microsoft proprietary file format. Since Microsoft does not share this format, juno5bdb cannot convert directly to it. Instead, since importing from both Eudora and Netscape is supported, you can use juno5bdb to get your email to either Eudora or Netscape first, then use the Import Wizard to get them into Outlook or Outlook Express. In order to accomplish this, you will actually need to install either Eudora or Netscape, then copy the MBOX files to its mail directory, then start it and view each folder so that the index file (.toc for Eudora and .snm for Netscape) is generated. Outlook and Outlook Express read this file and will report that no folders could be found if the index file is missing. And the index file must be valid. You can't just create an empty file with the correct extension. That just generates an error from the Import Wizard. You could also get errors if the files are still opened when running the Import Wizard, so it's best to exit the other mail client.

Issues Resolved

Version 0.6:

Version 0.5:

Version 0.4:

Version 0.3:

Version 0.2:


MBOX Format

This is a text file of email messages where the messages are seperated by at least one blank line and the first line of each messages starts with 'From '. Additionally, because MBOX readers determine the beginning of a message by looking for lines that start with 'From ', a message cannot have 'From ' at the begining of any line except the first. Therefore they must be 'escaped' by preceeding them with a greater-than sign ('>'). A proper MBOX reader will also strip off these 'escapes' before displaying the message, therefore when writing a message to an MBOX file, any lines that start with a sequence of greater-than signs ('>') immediately followed by 'From ', must also be 'escaped' with a '>'. See the 'mbox(5)' man page from a Unix system. The one I used was http://www.qmail.org/man/man5/mbox.html.

Juno 5.0 Mailbox Format

The Juno 5.0 mailbox consists of two files, 'mailbox.bdb' and 'mailbox.atr'. These are found in each of the USER folders of the Juno 5.0 directory. If only one Juno email account is used, then there will only be one USER folder and it will be 'USER0000'. If multiple Juno email accounts are used, then there will also be 'USER0001', 'USER0002', etc.

Both the BDB (mailbox.bdb) and the ATR (mailbox.atr) files are 'Berkeley DB' (aka 'Berkeley Database') files. Berkeley DB is Open Source software and is maintained by Oracle. Juno 5.0 uses 'Btree version 7' which is supported by Berkeley BD version 3.0.55. This older version can be downloaded at the Berkeley DB Release History.

The BDB file contains the actual email messages. Email messages may be saved in chunks. The key for the first chunk (or possibly the full message) is a unique eight digit hexadecimal number. If there are additional chunks, their keys are the key of the first chunk appended with both a plus sign ('+') and another eight digit hexadecimal number that starts at '1' and increases for each chunk. For example, if message 11 (or 'b' hexadecimal) consisted of three chunks, the keys would be '0000000b', '0000000b+00000001', and '0000000b+00000002'.

The ATR file contains the list of folders, the list of messages in each folder, and information about each message including it's status such as Read, Replied, Forwarded, etc.

The list of folders is stored using a key of '00000000!' appended with an eight digit hexadecimal number. The value stored is the key for the folder.

There are two parts of a folder, some attribute information and the list of messages belonging to the folder. There seem to be four folder attributes. Their keys are the folder key appended with both a dot ('.') and the eight digit hexadecimals numbers '00000000' through '00000003'. Attribute '00000000' is the folder name and attribute '00000001' appears to be the position in the folder list of the last viewed messages (and '-1' if the folder is empty.) The other two attributes, '00000002' and '00000003', are usually there, but not always. I have not figured out what they represent. The other part of the folder is the list of messages it contains. The key for these is the folder key appended with both a forward slash ('/') and an eight digit hexadecimal number. The value is the key for a message in the BDB file, which is also used to find message attributes in this file.

The keys for message attributes is the message key appended with both a dot ('.') and the eight digit hexadecimal numbers '00000000' and '00000007' through '0000000c'. Attribute '00000000' is the messages status: 1=Forwarded, 2=JunoInternal, 3=Read, 4=Replied, 5=Sent. Attribute '00000007' is the subject, '00000008' is the received timestamp in hexadecimal, '00000009' is the sender, and '0000000a' is the receipient. The others I am not sure of. Some attributes were missing for some messages.

The ATR files has some additional key/data pairs. The key '00000000.00000000' has a value of 'ROOTFOLDER'. There is a key '00000000.00000001' but I don't know what it represents. The key '00000000.00000005' appears to be the total number of messages in the BDB file. The key '!nextkey' appears to be the number in hexadecimal of the next key to use.

Additionally, both the ATR and BDB files have a key '!JunoVer' which has the value 'JME0.7', at least in my case.

Valid XHTML 1.0! Formatting and XHTML/CSS markup done by Michael Greene.

The text of this document, original formatting, and all other code associated with juno5bdb herein is © Copyright 2003–2006 Larry Cook.