Eudora2Unix Details


Tested on

Mailbox format

The Eudora mailbox format is very nearly unix mbox format, the main difference being that the initial line of a message, the one that begins with the word 'From ' with no colon, has the string '???@???' in place of the sender's e-mail. By extracting the sender's e-mail from other message headers and using this to repair the 'From ' line, Eudora mailboxes are made usable by many unix mail clients.

The Date header is often left off of Eudora messages, presumably because it is contained in the initial 'From ' line. That date isn't in quite the format required by mbox format, so it must be massaged a little.

Furthermore, the exact format of the date header specified in RFC 2822 is not always achieved by old email. Often, the comma required after the weekday is left off; this will choke some finicky clients. This is also repaired.

Status and priority

Most clients have a mechanism for indicating

This info isn't very well standardized.

Most versions of Eudora for Windows and Mac keep this info for each mailbox in a separate binary file with the suffix '.toc'. The exact format of this file varies between versions and is the subject of some debate. Furthermore, some Mac versions of Eudora store the info in the Mac "resorce fork" of the mailbox file. Fortunately, Qualcomm has provided utilities for converting such mailboxes to the two-file version. Get it here: TOCConvert

Read

This is indicated for most unix clients by an R in the Status header.

Downloaded

This is indicated for most unix clients by an O in the Status header.

Priority

Eudora uses numbers from 1-5 (Highest to Lowest). Kmail responds to a mail header X-Priority with these same numbers, but for itself, uses the Priority header, which only takes one value, urgent.

Pine will "flag" a message with F in the X-Status header.

Answered

The conventional means of indicating that one message is a response to another is an In-Reply-To header corresponding to the Message-ID header of the other.

To use this to determine if a message has been answered, the whole mailbox must be read in advance. Furthermore, this method only works if the responses are in the same mailbox as the original.

Later versions of Eudora use this determination when they first build the .toc file for an existing mailbox.

Eudora Lite versions 1.x seem not to use or set the In-Reply-To header.

Kmail seems to make the determination on the fly, and displays responses to messages in a heirarchical fashion.

Pine is dumb this way, however, and only indicates the message was answered if the header X-Status has the value A.

Re-directed, Forwarded

Eudora records and distinguishes between "answered", "forwarded", "redirected" messages. Pine and Kmail only know a message was answered.

I don't see that Pine or Kmail use this information.

Incoming, Outgoing

These scripts don't address the issue of whether a message is sent by the user or received...it isn't appropriate for them to do so.

The only way Pine knows whether a message was incoming or outgoing, especially with old e-mail that was sent from a different e-mail address, is by knowing the user's old e-mail addresses.

This makes sense conceptually. If you're holding a paper missive in your hand, and don't remember how it got there, how do you know it was outgoing or incoming? Why, you compare it's addressee to your own name (and aliases).

To inform Pine of your old e-mail addresses, put them in the list alt-addresses in Setup->Config. Then it will display outgoing messages as
To: <recipient>

Special mailboxes

Most clients have special mailboxes for incoming, outgoing, and trash, and maybe draft messages. Eudora2Unix does its best to account for those of Eudora, Pine, and Kmail, according to this table:

Eudora * Pine KMail
In.mbx saved-messages ** inbox
Out.mbx sent-mail sent-mail
Trash.mbx *** trash
n/a postponed-msgs outbox (touched)
n/a drafts (skipped)
* Eudora for the Mac lacks the .mbx suffix
** When used as a POP client, Pine's INBOX is on the server; not a real file; downloaded messages are in saved-messages
*** Pine doesn't have a trash mailbox--just marks messages for deletion.

Attachments

Eudora extracts all attachments, converts them, and saves them in a user-configurable directory. In the place of the encoded binary, it places a line like
Attachment converted: filepath
in the message body.

This isn't very useful on the unix side. Besides ignoring the issue, there are two alternatives: either re-encode the binaries, and replace them in their corresponding messages according to RFC 2045, or somehow replace the Eudora filepath indicator with something more useful on the unix side.

The latter is certainly easier, and it's what I've done. Eudora2Unix creates a URI to a file
file://$HOME/maildir/attach/binary
Where attach is the argument of the -a flag passed to Eudora2Unix, and should correspond to the name of the Eudora attachments folder. Note this folder should be re-named to have no spaces. For Mac mail directories, Eudora2Unix also avoids processing this folder as a mail folder (since Mac mailbox names have no extensions, there's no other way for Eudora2Unix to distinguish between mailboxes and other binaries).

It makes the attachment 'clickable' only in Pine, and only if the file path contains no spaces. I have contacted both the Pine and Kmail developers about this issue. There is no reason why this method should not work well.

Note that it makes some sense for this directory to be invisible to Pine, so a name like '.attachments' is good.

Directory structure

The Eudora Mac mail directory structure is straightforward: the mailbox display reflects the filesystem structure. The Windows versions distinguish mail folders with a '.fol' suffix and mailbox files with a '.mbx'suffix. These suffixes aren't displayed by the program. Furthermore, the Windows 3.x versions must use 8-character DOS file names, but display nice long folder names. This is accomplished by means of a small table named 'dscmap.pce' in each directory that contains mailboxes.

Pine's directory structure is also straightforward. It starts in the directory $HOME/mail by default. Note that a directory can be hidden from folder display by putting a '.' in front of its name.

Kmail's directory structure is unjustifiably complicated. The folder names it displays correspond to directories, which must include subdirectories 'cur' 'new' and 'tmp', but which do not contain mailboxes! The actual content of the folder is in an invisible folder named '.foldername.directory'. Good grief.

So if you want to merge your converted files with an existing KMail directory, remember to copy both the 'foldername' and the invisible '.foldername.directory' for each mailbox folder tree.

Example

Copy Eudora directory to unix directory eudora-mail-directory, rename the Eudora Attachments folder as '.attachments',

Eudora2Unix.py -t kmail -a '.attachments' eudora-mail-directory

This will finally produce a directory 'Mail.e2u'. Once your are happy with it, and you're sure it won't wipe out anything important, its contents should be moved to the 'Mail' directory. Then Kmail will be able to see the results.

To Do

Eliminate user cleanup
User cleanup is way to messy. It would be preferable to copy original files into a temp directory, create auxiliary files there, then write converted files to a Mail.e2u directory, ready for use.
Attachments
Re-encode and insert into mbox? Just get Pine and Kmail to view file URI's properly?
Other unix clients
I see the purpose of this software as being to get Eudora mail over to unix, not in being a generic unix mail converter. It does Pine because I like Pine and Pine mailboxes are very like Eudora's; it does Kmail because it was originally written to do Kmail and Kmail is very popular. However, if another client could be supported by making a simple alteration, I wouldn't object.
Technical
Re-write EudoraTOC to make use of Python's built-in endian struct unpackers.

Further documentation

The scripts are also documented internally. User-level documentation can be viewed with the Python script 'pydoc.py', which comes with recent Python distributions.


Permanent URL: http://sourceforge.net/projects/eudora2unix/
Page last modified on 2002-12-09, by Stevan White (Stevan_White@hotmail.com).