Closed Bug 70374 Opened 24 years ago Closed 23 years ago

Malformed From dates in import of Outlook Express folders

Categories

(MailNews Core :: Database, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bcombee, Assigned: tonyr)

References

()

Details

(Whiteboard: imp-mail)

Attachments

(1 file)

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
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?
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.
Yeah we do. reassigning to tonyr
Assignee: bienvenu → tonyr
Status: UNCONFIRMED → NEW
Ever confirmed: true
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.
QA Contact: esther → nbaca
Whiteboard: imp-mail
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.
Attached patch Proposed patch.Splinter Review
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+
Fix checked into trunk.
Status: NEW → RESOLVED
Closed: 23 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.

Attachment

General

Creator:
Created:
Updated:
Size: