When you double-click on an attachment listed in the Attachments pane in Thunderbird, a dialog will open asking "What should Thunderbird do with this file?" The choices will be:
- Open with: default application for handling this file type, or some other application
- Save to Disk
- Do this automatically for files like this from now on. [optional, for one of the two above choices]
If you select the "Do this automatically for files like this from now on" checkbox, Thunderbird will remember the action you chose for the specified file type (such as JPG image files), so that the dialog will be bypassed for future attachments of this file type in the future.
- 1 Changing the settings for attachment-handling actions
- 2 Troubleshooting
- 3 Alternative approach
- 4 External links
Changing the settings for attachment-handling actions ∞
Tools > Options > Attachments, there are options panels for "Attachments Folder" and "Download Actions".
"Attachments Folder" settings ∞
This simply allows you to set a default folder for saving attachments, so that you do not need to manually select a folder every time you save an attachment by double-clicking on it. It will not automatically save attachments in incoming messages to the specified folder without user intervention.
"Download Actions" settings ∞
Despite what the labelling in this panel might suggest (it says "Thunderbird can automatically save or open attachments of certain types"), these settings simply allow you to change the save/open actions that will be performed when you double-click on an attachment of a specified file type. Changing these settings will not allow save/open actions to be performed automatically for attachments in incoming messages without user intervention. For instance, if you previously used the "Do this automatically for files like this from now on" checkbox to have Thunderbird always open ".doc" attachments with Word, you can undo that file-handling association by clicking on the "DOC" file type and clicking the "Remove Action" button.
To add a download action to this list, open an e-mail that has an attachment of the type you want to add, or write a new e-mail and attach a file of the type that you want to add. Open the attachment and choose how you want Thunderbird to open it. Check the box "Do this automatically for files like this from now on".
The MIME Edit extension adds a
Tools > MIME Edit > Edit menu command that does everything (except for searching) that the download actions window does, plus it lets you create a entry.
Unexpected handling of certain attachments ∞
Some mail programs send attachments with the wrong content type. This can make Thunderbird handle an attachment in an unexpected way when you try to open it.
To check the content type of an attachment, select the e-mail in a folder but do not open the e-mail. From the menu bar choose View -> Message Source. Find the Content-Type header that names the attachment. Note that there might be many Content-Type headers in the message, so you must be careful to find the one that applies to the attachment you are investigating. A Content-Type header looks like:
Content-Type: application/pdf; name="test.pdf"
Thunderbird uses the content type to decide what to do with the file. If the content type is unhelpful, then Thunderbird uses the file name extension to decide what to do with the file. If the content type does not match the file name extension, then Thunderbird might not handle the file in the way you expect. You might have to save the file so that you can open it in the way you want.
"Do this automatically..." checkbox disabled ∞
Some mail programs send attachments with a nonspecific content type: application/octet-stream or
appplication/x-msdownload. These content types can apply to various different types of file. Therefore the box "Do this automatically for files like this from now on" is disabled.
To work around this, ensure that Thunderbird's attachment-handling action for the file name extension is not the system default application. Instead, change it to specify the actual application.
If that doesn't help, send yourself an e-mail to which you manually attached a file with this file name extension. (Do not forward an email whose attachment caused the box to be disabled.) Then open the attachment and choose how you want Thunderbird to open it. Check the box "Do this automatically for files like this from now on".
Note - Another workaround is to set your operating system to handle these nonspecific content types using some application. This is not usually a good idea, because these nonspecific content types can apply to various different types of file.
"Open with" choice disabled ∞
Thunderbird disables the "Open with" choice in the "What should Thunderbird do with this file?" dialog box if the attached file seems to be executable (a program). This is because an executable file in an e-mail might contain malicious code. If you are sure you want to run the program, save it and then run it.
Removing all the settings for attachment-handling actions ∞
If Thunderbird doesn't seem to be performing attachment-handling actions as it should, or if certain options are grayed out (not selectable) when they shouldn't be, and you can't resolve the issue as described above, it could be due to a corrupted
mimeTypes.rdf file. Thunderbird uses this file to store your file-handling preferences for specified file types. Deleting it sometimes cures the problem. To do so:
- Exit Thunderbird if it is running.
- Recommended: Make a temporary backup of your Thunderbird profile (or at least of the mimeTypes.rdf file).
mimeTypes.rdffrom your Thunderbird profile folder.
Restart Thunderbird to see if the problem has been fixed.
Hacking Thunderbird's settings ∞
Advanced users may be able to resolve some issues by opening
mimeTypes.rdf with a text editor such as Notepad and manually editing the file.
Mac-related issues ∞
Apple Mac computers send attachments in a special format (described in RFC 1740). Thunderbird can normally decode these Mac-encoded attachments.
If you do not use a Mac, and you receive attachments from a Mac user, then you might see extra attachments that you cannot open. You can ignore these extra attachments, because they contain data that is only useful on a Mac.
If you use an Intel Mac, then there are known bugs in the handling of Mac-encoded attachments—see, for example: bug 361401 and related bugs.
Alternative approach ∞
Thunderbird normally calls the appropriate viewer based on the MIME type in the Content-Type header, regardless of the attachments file extension. The Download Actions table displays the MIME type as a file type. A MIME type of application/pdf is displayed as PDF document for example. The OpenAttachmentByExtension extension provides an alternative approach. Its meant for users who frequently receive messages whose attachments either have the wrong MIME type, or no MIME type. The extension ignores the MIME type and selects the viewer based on the file extension (including no file extension). It also provides the option to specify additional command line arguments when launching the viewer.
The extension doesn't provide a GUI to specify what action should occur. You need to specify the actions by modifying Thunderbirds preferences. See the extension's readme.txt for more details. It is generally safer to use the MIME type (Thunderbird's default behavior) to select a viewer than the file extension.