Malformed From dates in import of Outlook Express folders

RESOLVED FIXED

Status

MailNews Core
Database
RESOLVED FIXED
17 years ago
10 years ago

People

(Reporter: bcombee, Assigned: tonyr)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: imp-mail, URL)

Attachments

(1 attachment)

1.34 KB, patch
Jean-Francois Ducarroz
: review+
(not reading, please use seth@sspitzer.org instead)
: superreview+
Details | Diff | Splinter Review
(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DigExt)
BuildID:    2001021508

Using Mozilla to import Outlook Express 5.0 mail folders creates MBOX format 
folders that have a non-standard date format in the "From " separator lines

Reproducible: Always
Steps to Reproduce:
1. Import mail from Outlook Express
2. Inspect the folder with a text editor


Actual Results:  The separator line (on my Win2K box) is produced as

From ????@???? 1 Jan 1965 00:00:00

Expected Results:  This format is incompatible with some other programs that 
use the Unix mailbox format, most notably Eudora 5.0.  It requires a date that 
looks like

From ???@??? Tue Feb 27 11:25:18 2001

On old Unix archive I had lying around had a date like this

From foo Sat Nov 14 14:46:59 1992

so the date format required by mbox seems to be

"Weekday Month Day 24hrtime year"

I was able to get imported OE to Mozilla folders to work in Eudora by doing a 
search and replace, changing the 1965 string to a similar string but with the 
RFC822 date

Comment 1

17 years ago
did you run an actual importer? Does mozilla have code to import an outlook
express folder? That's not the mail database code. Do we have a component for
that, esther?
(Reporter)

Comment 2

17 years ago
I wasn't sure which component to put this under, but since it involved formats 
I chose this one.  The import code is invoked by File/Import... from the mail 
client.

Comment 3

17 years ago
Yeah we do.  reassigning to tonyr
Assignee: bienvenu → tonyr

Updated

17 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 4

17 years ago
Well, it turns out the following code exists in 
mailnews/import/oexpress/nsOEMailbox.cpp:

  const char *CMbxScanner::m_pFromLine = "From ????@???? 1 Jan 1965 00:00:00
\x0D\x0A";

mailnews/import/oexpress/nsOE5File.cpp:

  const char *nsOE5File::m_pFromLineSep = "From ????@???? 1 Jan 1965 00:00:00
\x0D\x0A";

These constant strings are used in the code:

  // Begin every message with a From seperator
  rv = m_dstFile->Write( m_pFromLine, fromLen, &cntRead);

So it would appear that it's hard-coded into the importer.  But in the eudora 
code, there is the following:

  nsCString fromLine(eudoraFromLine);
  ...
  rv = compose.CopyComposedMessage( fromLine, compositionFile, pDst, copy);

which appears to mean the fromLine() is getting massaged for the eudora import.

Updated

16 years ago
QA Contact: esther → nbaca

Updated

16 years ago
Whiteboard: imp-mail

Comment 5

16 years ago
We fixed the similar problem for Eudora and Outlook in bug 57125 (see 
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=32069) but did not fix 
it for OE. A patch is coming.

Comment 6

16 years ago
Created attachment 85521 [details] [diff] [review]
Proposed patch.

Use the right date format for the "From " line (ie, "From - Mon Jan 1 00:00:00
1965").
Comment on attachment 85521 [details] [diff] [review]
Proposed patch.

R=ducarroz
Attachment #85521 - Flags: review+
Comment on attachment 85521 [details] [diff] [review]
Proposed patch.

sr=sspitzer
Attachment #85521 - Flags: superreview+

Comment 9

16 years ago
Fix checked into trunk.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.