Open Bug 1694942 Opened 8 months ago Updated 7 months ago

maildir converter should ignore more files, which are not mail files (such as filterlog.html)


(MailNews Core :: Backend, defect)



(thunderbird_esr78 wontfix)

88 Branch
Tracking Status
thunderbird_esr78 --- wontfix


(Reporter: mkmelin, Assigned: benc)


(Blocks 1 open bug)


(Keywords: leave-open)


(1 file)

The converter is not strict enough about files in the profile that are non-mail. E.g. filterlog.html in the mbox will create a maildir folder named "filterlog.html" and subfolders cur+tmp.

It should probably mirror nsMsgLocalStoreUtils::nsShouldIgnoreFile

Summary: maildir converter should ignore more file (such as filterlog.html) → maildir converter should ignore more files, which are not mail files (such as filterlog.html)

Yup. Pretty sure this is responsible for Bug 1529929 at least, and likely some other ones.

Notes to self:

  • It looks like NNTP accounts don't use filterlog.html, but use another naming scheme instead, possibly a per-folder one (see nsMsgFilterList::GetLogFile()). And I don't think even nsMsgLocalStoreUtils::nsShouldIgnoreFile() takes account of this.
  • I think the mbox->maildir conversion should probably also have some sort of heuristic to avoid files that are obvious non-mboxes. Maybe peeking at the first few lines to see if it can spot some headers, say...
  • The root cause of all this is insufficent segregation between actual mail storage files/dirs and all the other files. I think it'd be worth trying to prise them apart one day (eg, have a fixed subdir to hold only mail). But waaay out of scope here.
  • Another side effect: all the corner cases where some names are invalid folder names. You just know we'll get a bug report one day from someone who desperately needs to be able to name one of their folders "filterlog.html" or "sort.dat" or whatever...
Assignee: nobody → benc
Keywords: leave-open

I think that patch should fix things (and include the problem in a simple test case), but I think there are a few improvements to follow up on.

Pushed by
Update whitelist of "special" files for mailstore conversion. r=mkmelin
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.