cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mizar71
New member
Status: New idea

# Description

Local mail folders (mbox) grow very large because attachments and inline images are stored inside the folder file. Thunderbird already has "Detach", which replaces an attachment with an `X-Mozilla-External-Attachment-URL` reference to a file on disk. This works well for normal attachments, but it has two limits:

1. It is a manual, per-message action. There is no option to do it automatically (for example on arrival, or in bulk on a folder).
2. It does not work for inline images (parts referenced from the HTML with `cid:`). If such a part is detached, the image disappears from the message body and is not listed as an attachment. If the Content-ID is removed so that it becomes a normal attachment, it is listed, but it is no longer shown in the body.

Rewriting the HTML to use `file:///` URLs does not help, because the message content cannot load local files (understandably, for security reasons), so the image is not displayed.

# What Eudora did

Eudora saved attachments and embedded images in a separate folder (an "Attachments" directory). The message kept only a reference to the file, and Eudora displayed it in the message, including inline images. The mail file stayed small and the message looked the same as before.

# Proposed behavior

- A preference (for example per account or per folder) to save attachments and inline images to a chosen directory instead of inside the mbox.
- Existing detached references (`X-Mozilla-External-Attachment-URL`) are also honored for inline parts: when the HTML refers to `cid:xyz` and the part with that Content-ID is a detached reference, Thunderbird reads the external file itself and displays it in the body, without the message content loading a `file:` URL directly. This keeps the current security model.
- Detached inline images are also listed in the attachment pane, so they can be opened or saved.
- Optional bulk action to detach attachments and inline images from all messages of a folder, with a size threshold.

# Use case

Users with many years of mail and large local folders who want smaller mbox files (faster compaction, backup and search) without losing how messages look.

# Workaround used today

An external script that rewrites the mbox, saving the parts to disk and replacing them with `X-Mozilla-External-Attachment-URL`. Normal attachments work; inline images do not display in the body.