Open
Bug 394823
Opened 17 years ago
Updated 2 years ago
TB does not open valid message/rfc822 files if extension is not .eml
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
NEW
People
(Reporter: julian_bee, Unassigned)
References
(Blocks 2 open bugs)
Details
User-Agent: Opera/9.23 (Windows NT 5.1; U; de)
Build Identifier: Version 2.0.0.6 (20070728)
Thunderbird won't open a file if its extension is not .eml although it is actually a properly formatted message/rfc822.
Reproducible: Always
Steps to Reproduce:
1. Export any email message to your desktop
2. Rename that file to "whatever.noteml"
3. Shift-right-click that file, select "open with" and choose thunderbird to open the file.
Actual Results:
Thunderbird opens in main view.
Expected Results:
Thunderbird tests the file for actually being a message/rfc822 and in that case loads the file in compose window.
The reason for this can be found in mailnews/base/src/nsMessengerBootstrap.cpp around line 188 where it says
if (StringEndsWith(arg, NS_LITERAL_STRING(".eml"), nsCaseInsensitiveStringComparator())) {
...
}
Similar to bug 350819, the same line of argumentation applies here. Verifying if the file to be opened actually is in message/rfc822 format would go beyond the patch in attachment 240811 [details] [diff] [review] for just allowing other file extensions.
This would also resolve the concerns stated in bug 350819 comment #9.
I was tempted to confirm this bug as an enhancement request, but the patch
in bug 350819 comment #13 has been canceled. Thus, either that bug proceeds towards the more general solution envisioned here (in which case this is a duplicate), or bug 350819 gets fixed by a more generalized patch yet to be presented here (in which case this bug should be confirmed).
The current behavior [TB 3.0a2pre (Windows/2008051503)] is based on the file extension only, as tested:
1. message/rfc822 file ending in ".eml" opens correctly;
2. message/rfc822 file with ".whatever" does not open at all;
3. text/plain file with ".eml" opens as text (without headers);
4. image/png file with ".eml" opens as partially shown text.
While it is commonly accepted that certain file types are indicated by
their file extensions (not in all operating systems though), it appears to
make more sense to perform a sanity check whether an actual message/rfc822
file is opened or one with some other content.
Nobody voiced a different opinion, thus I'm confirming this here as it goes beyond bug 350819 and appears to be the more comprehensive solution.
An additional suggestion is given in bug 426549 on non-message attachments,
which could be considered as passed like "-compose attachment=xxx" when opened with right-click or drag and drop.
Blocks: 350819
Status: UNCONFIRMED → NEW
Component: General → MailNews: Backend
Ever confirmed: true
OS: Windows XP → All
Product: Thunderbird → Core
QA Contact: general → backend
Hardware: PC → All
Version: unspecified → Trunk
Assignee | ||
Updated•16 years ago
|
Product: Core → MailNews Core
Updated•12 years ago
|
Summary: file not being opened if extension is not .eml → TB does not open valid message/rfc822 files if extension is not .eml
Comment 4•12 years ago
|
||
(In reply to rsx11m from comment #3)
> An additional suggestion is given in bug 426549 on non-message attachments,
> which could be considered as passed like "-compose attachment=xxx" when
> opened with right-click or drag and drop.
That part has been implemented: When opening alleged non-message files, we open a new composition with the file attached, for all cases of:
thunderbird.exe "somefile.ext" (where ext != eml)
So the remaining problem is that valid message/rfc822 files which happen to have an extension other than .eml (like .msg, bug 350819) are also opened as attachments of a new composition, instead of opening them as a message with msg reader (this bug).
rsx11m, Magnus (formerly assigned to bug 350819), is there an easy way of determining whether the passed file has message/rfc822 format?
Flags: needinfo?(mkmelin+mozilla)
Comment 6•12 years ago
|
||
I think there's another bug for thunderbird -file <foo> also just working with .eml files.
Comment 7•12 years ago
|
||
Bug 731945 - Command line -file option should open file even if the extension isn't .eml
Updated•2 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•