AttachmentExtractor Continued - Add-on to semi automatically remove attachments from many emails

  • AttachmentExtractor Continued ("AEC" for short) is a further development of the original "AttachmentExtractor" addon. A few features were removed from the original because they no longer worked. On the other hand, the feature of the favorite folders was added. The addon is available for Thunderbird 60, 68 and 78, which required some internal and interface changes (especially in the options). Unfortunately, the absolutely central function of the addon code leads to a fatal crash from up Thunderbird version 91. The problem could not be resolved. The migration of the addon to a WebExtension has already started and could possibly continue in future, but some internal code changes to Thunderbird itself must first be made in order for the addon to function satisfactorily and error-free. Until then, the development is stopped.


    This project should be regarded as inherently a work in progress. Most of the functionality is achieved by leveraging existing Thunderbird functionality in a more efficient way, so it should be safe. Some of the functions involve modifying your emails, but warnings are displayed as appropriate. In summary, I take absolutely no responsibility of the actions of the add-on, either unintended or otherwise.

    1 Download

    The download can be found on "ATN (": Download

    2 Features


    At the moment I'm working on the add-on to fix it for Thunderbird 60 and up. Most things are working again and you can download a first Beta-Version from ATN. Probably some features will be removed from the add-on in the final version.

    These features should be working in Thunderbird 60.*:

    • Extract attachments to the default Thunderbird download folder.
    • Extract attachments to a specified folder.
    • Extract the attachments from an entire Thunderbird message folder.
    • Can automatically intelligently rename files to avoid replacing existing files.
    • Progress Dialog to inform you of which message and attachment is currently being extracted

    Not yet tested or not working features in Thunderbird 60.*:

    • You can choose to mark messages as read and or delete them after attachment extraction.
    • Optionally notifies you when its done extracting, if more than 1 message is selected.
    • Internal Detaching can suppress confirmation on every email.
    • Supports deleting and detaching* of attachments. *(with internal detacher).
    • Can filter attachment extraction based on the filename of the attachment.

    3 Localization

    3.1 Supplied languages

    The add-on has been translated into about 14 languages so far. But some translations are not completely up to date.

    3.2 Create and improve localization

    The add-on localization can be done on the Crowdin localization platform (starting in November 2019). Please, no longer use BabelZilla for the translation, as it is no longer compatible with current add-ons from Thunderbird 68 and newer.

    4 Reference

    4.1 Attachment Extractor #Date# timestamp codes

    Character Description Example returned values
    Day --- ---
    d Day of the month, 2 digits with leading zeros 01 to 31
    D A textual representation of a day, three letters Mon through Sun
    j Day of the month without leading zeros 1 to 31
    l (lowercase 'L') A full textual representation of the day of the week Sunday through Saturday
    N ISO-8601 numeric representation of the day of the week 1 (for Monday) through 7 (for Sunday)
    S English ordinal suffix for the day of the month, 2 characters st, nd, rd or th. Works well with j
    w Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday)
    Month --- ---
    F A full textual representation of a month, such as January or March January through December
    m Numeric representation of a month, with leading zeros 01 through 12
    M A short textual representation of a month, three letters Jan through Dec
    n Numeric representation of a month, without leading zeros 1 through 12
    Year --- ---
    Y A full numeric representation of a year, 4 digits Examples: 1999 or 2003
    y A two digit representation of a year Examples: 99 or 03
    Time --- ---
    a Lowercase Ante meridiem and Post meridiem am or pm
    A Uppercase Ante meridiem and Post meridiem AM or PM
    g 12-hour format of an hour without leading zeros 1 through 12
    G 24-hour format of an hour without leading zeros 0 through 23
    h 12-hour format of an hour with leading zeros 01 through 12
    H 24-hour format of an hour with leading zeros 00 through 23
    i Minutes with leading zeros 00 to 59
    s Seconds, with leading zeros 00 through 59
    Unix-Timestamp --- ---
    U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)

    4.2 Detached Images Fix


    This small fix was included in prior/original AttachmentExtractor but I plan to remove it out of final AttachmentExtractor Continued.

    Thunderbird has an option to Display Attachments Inline (which is enabled by default) which works well until you detach the attachment. The attachment icon links to the detached file correctly but the inline image doesn't. The fix works by changing the code of message that Thunderbird displays within the messagepane or standalone window to point to the detached file so the image displays inline the same before.

    4.2.1 Security Considerations:

    By default Thunderbird, (quite sensibly) blocks all access to your local computer from within emails. To work the fix opens up hole in this block which could allow a script (and therefore an outside attacker) to access; copy; open; or delete the attachment you detached from your computer. A few caveats to this seemingly huge problem:

    1. You would have to enable JavaScript within messages which is off by default and difficult to enable by mistake;
    2. The hole is only opened up just after the email has loaded and is open for less than a second before being closed again;
    3. Only the attachments you previously detached from that email are exposed;
    4. The 'attacker' would have to guess the correct name of the attachment to be able to guess what URI to access.

    On balance the prior add-on author believed the convenience outweighs the potential risk.

    4.3 Keys to use for relative savepath

    Any of the keys in quotes below should work:

    5 See also