-
Notifications
You must be signed in to change notification settings - Fork 6
/
details.html
437 lines (408 loc) · 12.1 KB
/
details.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<link rev="MADE" href="mailto:[email protected]" />
<title>Eudora2Unix Details</title>
<style type="text/css">
<!--
body { color: black; background-color: white; }
kbd { font-family: sans-serif; font-style: normal; }
h2 { font-size: medium; font-weight: bold; font-style: normal; }
em.underline { font-weight: medium; font-style: normal; text-decoration: underline; }
code { color: navy; }
kbd { color: #004400; }
#special-mbx th { border-top: thin black solid;
border-bottom: thin black solid; }
table { margin-left: 1cm; margin-right: 1cm; }
code.indent { padding-left: 1cm; }
-->
</style>
</head>
<body>
<h1>Eudora2Unix Details</h1>
<hr />
<ul>
<li>
Converts Eudora mailbox files to mbox format
</li>
<li>
Can use Eudora '<kbd>.toc</kbd>' files to preserve info of whether a
message was read or not, and the message priority.
</li>
<li>
Marks a file as "Answered" for Pine if it find another message
that refers to it.
</li>
<li>
For Windows directories, can use '<kbd>dscmap.pce</kbd>' files to
restore folder and file names.
</li>
<li>
Converts Eudora directory structure to either Pine or Kmail format
</li>
</ul>
<h2>
Tested on
</h2>
<ul>
<li>
Eudora v 7.1 Windows
</li>
<li>
Eudora v 5 Windows
</li>
<li>
Eudora v 6.2.4 Mac
<li>
Eudora Lite v 3.1.3 Mac
</li>
<li>
Eudora Lite v 1.3.1 Mac
</li>
<li>
Eudora Lite v 3.0.6 Windows
</li>
<li>
Eudora Lite v 1.5.4 Windows
</li>
</ul>
<h2>
Mailbox format
</h2>
<p>
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 '<code>From </code>' with no colon, has the string
'<code>???@???</code>' 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
'<code>From </code>' line, Eudora mailboxes are made usable by many unix
mail clients.
</p>
<p>
The <code>Date</code> header is often left off of Eudora messages,
presumably because it is contained in the initial '<code>From </code>' line.
That date isn't in quite the format required by mbox format, so it must be
massaged a little.
</p>
<p>
Furthermore, the exact format of the date header specified in
<a href="http://www.faqs.org/rfcs/rfc2822.html">RFC 2822</a>
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.
</p>
<h2>
Status and priority
</h2>
<p>
Most clients have a mechanism for indicating
</p>
<ul>
<li>
Whether or not a message has been read
</li>
<li>
Whether or not a message has been downloaded
</li>
<li>
A level of priority of a message
</li>
<li>
Whether a message was answered, re-directed, or forwarded
</li>
</ul>
<p>
This info isn't very well standardized.
</p>
<p>
Most versions of Eudora for Windows and Mac keep this info for each
mailbox in a separate binary file with the suffix '<kbd>.toc</kbd>'.
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:
<a href="ftp://ftp.eudora.com/eudora/eudoralight/mac/extras/utils/TOCConvert.sea.hqx">TOCConvert</a>
</p>
<dl>
<dt>
Read
</dt>
<dd>
<p>
This is indicated for most unix clients by an <code>R</code>
in the <code>Status</code> header.
</p>
</dd>
<dt>
Downloaded
</dt>
<dd>
<p>
This is indicated for most unix clients by an <code>O</code>
in the <code>Status</code> header.
</p>
</dd>
<dt>
Priority
</dt>
<dd>
<p>
Eudora uses numbers from 1-5 (Highest to Lowest).
Kmail responds to a mail header <code>X-Priority</code> with
these same numbers, but for itself, uses the
<code>Priority</code> header, which only takes one value,
<code>urgent</code>.
</p>
<p>
Pine will "flag" a message with <code>F</code> in the
<code>X-Status</code> header.
</p>
</dd>
<dt>
Answered
</dt>
<dd>
<p>
The conventional means of indicating that one message is a response
to another is an <code>In-Reply-To</code> header corresponding
to the <code>Message-ID</code> header of the other.
</p>
<p>
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.
</p>
<p>
Later versions of Eudora use this determination when they first
build the <kbd>.toc</kbd> file for an existing mailbox.
</p>
<p>
Eudora Lite versions 1.x seem not to use or set the
<code>In-Reply-To</code> header.
</p>
<p>
Kmail seems to make the determination on the fly, and displays
responses to messages in a heirarchical fashion.
</p>
<p>
Pine is dumb this way, however, and only indicates the message was
answered if the header <code>X-Status</code> has the value
<code>A</code>.
</p>
</dd>
<dt>
Re-directed, Forwarded
</dt>
<dd>
<p>
Eudora records and distinguishes between "answered", "forwarded",
"redirected" messages. Pine and Kmail only know a message was
answered.
</p>
<p>
I don't see that Pine or Kmail use this information.
</p>
</dd>
<dt>
Incoming, Outgoing
</dt>
<dd>
<p>
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.
</p>
<p>
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.
</p>
<p>
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).
</p>
<p>
To inform Pine of your old e-mail addresses, put them in the list
<kbd>alt-addresses</kbd> in <kbd>Setup->Config</kbd>. Then it
will display outgoing messages as<br>
<code>To: <recipient></code>
</p>
</dd>
</dl>
<h2>
Special mailboxes
</h2>
<p>
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:
</p>
<table id="special-mbx" cellspacing="10">
<tr>
<th>Eudora *</th> <th>Pine</th> <th>KMail</th>
</tr>
<tr>
<td><kbd>In.mbx</kbd></td> <td><kbd>saved-messages</kbd> **</td> <td><kbd>inbox</kbd></td>
</tr>
<tr>
<td><kbd>Out.mbx</kbd></td> <td><kbd>sent-mail</kbd></td> <td><kbd>sent-mail</kbd></td>
</tr>
<tr>
<td><kbd>Trash.mbx</kbd></td> <td>***</td> <td><kbd>trash</kbd></td>
</tr>
<tr>
<td>n/a</td> <td><kbd>postponed-msgs</kbd></td> <td><kbd>outbox</kbd> (touched)</td>
</tr>
<tr>
<td>n/a</td> <td></td> <td><kbd>drafts</kbd> (skipped)</td>
</tr>
</table>
<table>
<tr><td>
* </td><td>Eudora for the Mac lacks the <kbd>.mbx</kbd> suffix
</td></tr>
<tr><td>
** </td><td>When used as a POP client, Pine's INBOX is on the server; not a
real file; downloaded messages are in saved-messages
</td></tr>
<tr><td>
*** </td><td>Pine doesn't have a trash mailbox--just marks messages for
deletion.
</td></tr>
</table>
<h2>
Attachments and Embedded Content
</h2>
<p>
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<br />
<code class="indent">Attachment converted: filepath</code><br />
in the message body.
</p>
<p>
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.
</p>
<p>
Eudora2Unix does the former. Attachment files are converted to MIME
attachments and are merged with the message body text from the mbx
file to create a multi-part MIME message in the resulting mailbox.
The MIME types assigned to attachments are assigned using the Python
mimetypes module, which uses a database of known file name extensions
to guess the appropriate MIME type for an attachment. If the
attachment's MIME type cannot be guessed from its filename, it will be
assigned a generic MIME type of application/octet-stream.
</p>
<p>
Embedded images are handled in a similar fashion. Eudora2Unix will
take embedded images referenced by a <br />
<code class="indent">Embedded Content: filepath</code><br /> line in
an MBX file and merge them with the message's body text as a multipart
MIME message. Unfortunately, Eudora doesn't do a very good job of
keeping track of what embedded images go along with which content id
(cid) URIs referenced in an HTML message. To re-connect images with
the <img> tags in HTML messages, Eudora2Unix will attempt to
parse the HTML to find <img> tags whose src attributes use the
"cid:" URL type. If an HTML message's text fails to parse as correct
HTML, Eudora2Unix will make a second attempt to find cid: URLs by
using a simpler and riskier regular expression match.
</p>
<p>If cid: URLs can't be found (or too few are found) in the HTML of a
message, any embedded images that can't be connected to specific
content ids in the message text will be attached as ordinary
attachments.
</p>
<h2>
Directory structure
</h2>
<p>
The Eudora Mac mail directory structure is straightforward: the
mailbox display reflects the filesystem structure.
The Windows versions distinguish mail folders with a '<kbd>.fol</kbd>'
suffix and mailbox files with a '<kbd>.mbx</kbd>'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 '<kbd>dscmap.pce</kbd>' in each directory that contains
mailboxes.
</p>
<p>
Pine's directory structure is also straightforward. It starts in
the directory <kbd>$HOME/mail</kbd> by default. Note that a
directory can be hidden from folder display by putting a '<kbd>.</kbd>'
in front of its name.
</p>
<p>
Kmail's directory structure is unjustifiably complicated. The folder
names it displays correspond to directories, which must include
subdirectories '<kbd>cur</kbd>' '<kbd>new</kbd>' and '<kbd>tmp</kbd>',
but which <em>do not</em> contain mailboxes!
The actual content of the folder is in an <em>invisible</em> folder named
'<kbd>.foldername.directory</kbd>'. Good grief.
</p>
<h2>
Example
</h2>
<p>
Copy Eudora directory to unix directory <kbd>eudora-mail-directory</kbd>,
rename the Eudora Attachments folder as '<kbd>.attachments</kbd>',
</p>
<p>
<code class="indent">Eudora2Unix.py -t kmail -a '.attachments' eudora-mail-directory</code>
</p>
<p>
This will finally produce a directory '<kbd>Mail.e2u</kbd>'. Once
your are happy with it, and you're sure it won't wipe out anything
important, its contents should be moved to the '<kbd>Mail</kbd>'
directory. Then Kmail will be able to see the results.
</p>
<h2>
To Do
</h2>
<dl>
<dt>
Other unix clients
</dt>
<dd>
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.
</dd>
<dt>
Technical
</dt>
<dd>
Re-write EudoraTOC to make use of Python's built-in endian
struct unpackers.
</dd>
</dl>
<h2>
Further documentation
</h2>
<p>
The scripts are also documented internally. User-level documentation
can be viewed with the Python script '<kbd>pydoc.py</kbd>', which comes
with recent Python distributions.
</p>
<hr />
<address>
Permanent URL: <kbd><a href="http://sourceforge.net/projects/eudora2unix/">http://sourceforge.net/projects/eudora2unix/</a></kbd><br />
Page last modified on
2010-12-17,
by Jonathan Abbey
(<a href="mailto:Stevan White <[email protected]>">[email protected]</a>).
</address>
</body>
</html>