Open Bug 731945 Opened 14 years ago Updated 10 months ago

Command line -file option should open file even if the extension isn't .eml

Categories

(Thunderbird :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: ikrabbe.ask, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.26 Safari/535.11 Steps to reproduce: Calling `thunderbird -mail URL' does not work with local files, where URL is one of: - FILENAME -- just the filename of the file in the current working directory (most appreciated mode of operation!) - $HOME/FILENAME -- full path to file - FILE:///$HOME/FILENAME -- correct FILE: URL (not usefull but often the last resort) A cross check using thunderbird as an interactive GUI APP, which I generally don't like, just starting `thunderbird' click to File->Open with that FILENAME used above, works as expected. Actual results: See that mess: ~ $ thunderbird -mail post enigmail.js: Registered components Unrecognized URL: post ~ $ thunderbird -mail $HOME/post enigmail.js: Registered components Unrecognized URL: /home/ingo/post ~ $ thunderbird -mail file://$HOME/post enigmail.js: Registered components Unrecognized URL: file:///home/ingo/post ~ $ thunderbird -mail file://$HOME/post enigmail.js: Registered components Unrecognized URL: file:///home/ingo/post ~ $ thunderbird -mail file:$HOME/post enigmail.js: Registered components Unrecognized URL: file:/home/ingo/post I can't imagine another form of URL, possibly you? Expected results: It should just have openend me the file as in interactively choosing File->Open->Saved Message, select Homedir, choose ALL Files filter, search the file, tag it and click open. Actually, this chain of clicks is pure pain for a command line user as I am. I can't even imagine persons who like to use such interfaces, but I know many of you do each day. BTW.: The File "post" is no EML, or whatever overcooked format, but just a simple, old-style, plain mbox file and I use thunderbird just to test how the mails I compose with some other tool (actually I use ed - The UNIX Editor).
(In reply to Ingo Krabbe from comment #0) Confirmed. This doesn't work. What is more, there is inconsistency between info here: https://developer.mozilla.org/en/Command_Line_Options and the Thunderbird command-line help (invoked by thunderbird --help) for this option. User Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 Application Build ID: 20120216022139
(In reply to Hashem Masoud from comment #1) > Confirmed. This doesn't work. What is more, there is inconsistency between > info here: https://developer.mozilla.org/en/Command_Line_Options and the > Thunderbird command-line help (invoked by thunderbird --help) for this > option. This is an interesting reply, as I assume, the -mail <URL> option should open the composer with a mailto:URL then. I would strongly recommend to change -mail <URL> into -compose <MAILTO-URL> in documentation and remove -mail <URL> from the docuemntation. Actually -file FILENAME does what I want, but please remove the filename filter. I saved a mail from my favourite mail client, which is mutt, into a ~/bugzilla-test file. Actually opening thunderbird -file ~/bugzilla-test does nothing! But mv ~/bugzilla-test ~/bugzilla-test.eml thunderbird -file ~/bugzilla-test.eml does actually work, though the file is an mbox and no eml file, whatever the latter might be. So could you please just try to open the file and fail with a fatal message when absolutely not able to. Again: This works: thunderbird -file ~/file.eml, where ~/file.eml is an mbox file. regards, ingo
OS: Linux → All
Hardware: x86_64 → All
Summary: Command line -mail URL does not work as expected → Command line -mail URL does not open file if the extension isn't .eml
(In reply to Magnus Melin from comment #3) > Yes, we require the file to be .eml > http://mxr.mozilla.org/comm-central/source/mail/components/ > nsMailDefaultHandler.js#382 What has the filename extension to do with the type of file you require? Actually I use mbox files, as any mail apps did 20 years ago.
(In reply to Magnus Melin from comment #3) > Yes, we require the file to be .eml > http://mxr.mozilla.org/comm-central/source/mail/components/nsMailDefaultHandler.js#382 Actually, reading the link you sent me, I see, that what you do is even worse! I strongly recommend, that you leave the file-type detection to the user, and split the file-type handling by differnet options -mail, -compose, -vcard What you are doing there is error prone and if that wasn't in a javascript sandbox anyway, this type of user input handling is of course the best way to introduce fatal bugs into a software. For Example: What happens if I simply rename my zip file to vcf and open it with the vcard reader. Is the content checked by the Services module or does it just open the binary content and leaves a core afterwards? (just an example) (not that I'm really interested in what you do to your source code and your brains, as I just use your software to test what any common **** software will do with my mails).
(In reply to Ingo Krabbe from comment #4) > (In reply to Magnus Melin from comment #3) > > Yes, we require the file to be .eml > > http://mxr.mozilla.org/comm-central/source/mail/components/ > > nsMailDefaultHandler.js#382 > > What has the filename extension to do with the type of file you require? > Actually I use mbox files, as any mail apps did 20 years ago. I think that is exactly why it's only .eml files supported. An .eml file isn't strictly an mbox file, though of course they are similar, and it may happen to work.
(In reply to Magnus Melin from comment #6) > (In reply to Ingo Krabbe from comment #4) > > (In reply to Magnus Melin from comment #3) > > > Yes, we require the file to be .eml > > > http://mxr.mozilla.org/comm-central/source/mail/components/ > > > nsMailDefaultHandler.js#382 > > > > What has the filename extension to do with the type of file you require? > > Actually I use mbox files, as any mail apps did 20 years ago. > > I think that is exactly why it's only .eml files supported. An .eml file > isn't strictly an mbox file, though of course they are similar, and it may > happen to work. So you really want to tell me, that making me renaming my mailbox files into .eml names is a user friendly use case?
Of course not, i'm just telling you the reasons it (probably) was designed that way. I think i'd be fine with not checking the extension myself...
Another reason to fix that: I'm using Ubuntu 11.10 where the application to open a file is determined by MIME type rather than by file extension. Secondly, I'm using recoll program to full-text search through my documents and emails. Once a email is found I'm trying to open it - recoll saves the email to a temporary file and runs system open - via thunderbird. This way I'm unable to work - I can't give .eml extention to be able to open the file.
Changing bug summary. -mail option is not for local file, it is for a message in Thunderbird like this: $ thunderbird -mail imap-message://who@invalid.host/INBOX#1 As Alexey said, determining by MIME type is reasonable to me.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Command line -mail URL does not open file if the extension isn't .eml → Command line -file option should open file even if the extension isn't .eml
Depends on: 394823
Severity: normal → S3
Attachment #9387569 - Attachment is obsolete: true
Depends on: 350819
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: