Score:0

Thunderbird doesn't recognize email file format - attaches instead of opening a file

in flag

Is there a way to force thunderbird to open a file as an email instead of attaching it in a new email form? mbsync by default downloads files without extension, which confuses thunderbird (and some other programs), but when copied and appended with .eml thunderbird opens them just fine.

Is there any workaround to solve it? Can linux somehow alias a file with a different name when opening it?

mook765 avatar
cn flag
No, when you want to open a file, you have to use it's name. Either rename the file or create a link where the link has the `.eml` extension
Hannu avatar
ca flag
`T-bird 102, Menu:File > Open > Saved Message > ...` ?
Daniel Krajnik avatar
in flag
Thanks, @Hannu I confirm that your method works, but ideally you could do the same from the terminal.
Daniel Krajnik avatar
in flag
@mook765 thanks, that makes sense although it complicates some scripts, because you need to clean all the links/copies afterwards.
Daniel Krajnik avatar
in flag
Maybe there is some trick with bash file redirection that could temporarily map the file to memory, rename it and present to thunderbird without writing anything new to the disk?
Hannu avatar
ca flag
Try renaming the file w .eml extension, then do `xdg-open filename`, might work. (I believe it is pre-installed, if not, then `apt install xdg-utils`)
Daniel Krajnik avatar
in flag
Hmm, renaming the file may break other programs that would expect it to still be there. The idea of adding a quick symbolic link to it and opening it instead would work fine if it wasn't for the mess on disk it could potentially create if something anything wrong. I'm looking currently for symbolic links that would be removed automatically after the process exits. Putting them in /tmp or some tempoorary directory isn't great neither, because this can also create a bit of a mess.
Hannu avatar
ca flag
... create them in /tmp ?
Daniel Krajnik avatar
in flag
@Hannu haha thanks, I've just mentioned that in the last comment :)
Hannu avatar
ca flag
Uh... didn't read all as it seems. ;-p - well.
Daniel Krajnik avatar
in flag
I forgot about "process substitution": running `cat <(SELECTED-FILE-NAME)` makes `SELECTED-FILE-NAME` look like a `/proc/self/fd/14` for the process - the trick now would be to find a way to rename `14` to `14.eml`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.