Open Bug 708941 Opened 13 years ago Updated 2 years ago

"From ..." lines at top of View/Message Source is eaten by each Compact of IMAP folder of offline-use=on

Categories

(MailNews Core :: Networking: IMAP, defect)

defect

Tracking

(Not tracked)

People

(Reporter: World, Unassigned)

Details

"From - ..." line at top of mail data is merged with "From ..." line which is Unix Mbox mail separator of offline-store file by each Compact of IMAP folder of offline-use=on, and the merged line is used as new Unix Mbox mail separator.
So, "From - ..." lines at top of mail data is decreased by one upon each Compact until non "From ..." line appears in mail data. 

Even if "From - ..." line at top of mail data is wrong message header and is garbage generated by upload of wrong mail data, this is data loss in offline-store file. 

This bug produces "mail data length decrease in offline-store file" by each Compact of IMAP folder of offline-use=on.
Even though mail data length in offline-store file is always kept correctly after Compact, this kind of activity can easily produce unwanted/accidental problems in other components.
I think "dicard of wrong From ... lines in message header upon fetch" is better action.

This is spin-off of bug 697635 comment #6 and bug 668482 comment #7.
Checked with Tb 8. With Tb 7, same View/Message Source display result as Tb 8 was observed by same IMAP older, same mail data, same test procedure, altough offline-store content was nt checked.
Some IMAP server reject wrong "From ..." line in message header. So, Gmail IMAP is used for test, because Gmail IMAP accepts the wrong message header.

[Steps to reproduce]

(0) Copy local mail folder file which contains data of one mail only as .eml file, and increase "From: - ..." lines to observe phenomenon easily.
Sample .eml file content.
> From - Sat Jan 01 01:02:03 2011
> From - Sat Jan 02 01:02:03 2011
> From - Sat Jan 03 01:02:03 2011
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
> X-UIDL: abcdefghijklmn
> X-Mozilla-Status: 0001
> X-Mozilla-Status2: 00000000
> X-Mozilla-Keys: $label1
>(snip)

(1) Drag&Drop the .eml file to thread pane of an IMAP account folder(offline-use=on). This is import of .eml file by Drag&Drop.
Content of offline-store file.
> From 
> From - Sat Jan 01 01:02:03 2011
> From - Sat Jan 02 01:02:03 2011
> From - Sat Jan 03 01:02:03 2011
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "From - Sat Jun 01 ..." .

(2) Compact of the IMAP folder of offline-use=on.
Content of offline-store file.
> From - Sat Jan 01 01:02:03 2011
> From - Sat Jan 02 01:02:03 2011
> From - Sat Jan 03 01:02:03 2011
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "From - Sat Jun 02 ...".

(3) Compact of the IMAP folder of offline-use=on.
Content of offline-store file.
> From - Sat Jan 02 01:02:03 2011
> From - Sat Jan 03 01:02:03 2011
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "From - Sat Jun 03 ...".

(4) Compact of the IMAP folder of offline-use=on.
Content of offline-store file.
> From - Sat Jan 03 01:02:03 2011
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "From - Sat Jun 04 ...".

(5) Compact of the IMAP folder of offline-use=on.
Content of offline-store file.
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "X-Account-Key: account9".

(6) Compact of the IMAP folder of offline-use=on.
Content of offline-store file.
> From 
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "X-Account-Key: account9".

(7) Repair Folder of the IMAP folder of offline-use=on.
Content of offline-store file.
> From - Fri Dec 09 12:13:15 2011
> X-Mozilla-Status: 0001
> X-Mozilla-Status2: 00000000
> From - Sat Jan 01 01:02:03 2011
> From - Sat Jan 02 01:02:03 2011
> From - Sat Jan 03 01:02:03 2011
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "From - Sat Jan 01 ...".

(8) Compact of the IMAP folder of offline-use=on.
Content of offline-store file.
> From - Sat Jan 01 01:02:03 2011
> From - Sat Jan 02 01:02:03 2011
> From - Sat Jan 03 01:02:03 2011
> From - Sat Jan 04 01:02:03 2011
> X-Account-Key: account9
>(snip)
View/Message Source shows lines from "From - Sat Jan 02 ...".
Same as step (2).

Note:
Because IMAP offline-store file of Tb, there is no need of "escaping of From line". "Rebuild-Index on local mail folder file" will never be invoked by Tb on offline-store file. Rebuil-Index related problem happens only when user used the offline-store file as local mail folder file(==used as ordinal Unix Mbox format mail data file).
Phenomnon seems next. 

When Compact of IMAP offline-use=on folder, Tb removes separator part, and Tb adds "From " line before mail data as new separator(or new place holder).
But if mail data starts with "From ..." line, Tb doesn't add "From " line before mail data, and Tb uses the first "From ..." line of mail data as new separator(or new place holder).
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.