filter messages by attachment size
How can I define a filter to display all my saved messages with attachments exceeding a certain size, e.g. attachments larger than 5 MB?
Many thanks for any hint. Peter
Chosen solution
peterCH said
The only point still not clear to me: why can't I access the attachment size information displayed in the attachment pane of Thunderbird?
That information is compiled at the time the message is displayed, part of extracting the encoded text from the message, and discarded along with the display window when it is closed.
Read this answer in context 👍 1All Replies (7)
Well, at one level, email doesn't know about attachment size. An email message is composed entirely of printable characters, so binary attachments or inclusions such as photos are encoded using base-64 or similar to convert them into a presentation made up of printable characters. The size of a message is the sum of all its parts. If it's over a few tens of kilobytes then it's a fair bet there is an attachment.
The Expression Search add-on enhances the search tools to allow a search/filter such as:
attachment:yes larger:20M
This will filter on messages that have attachments and whose overall size is greater than 20MB. You can also set an absolute size, a "less-than" rule or a range. "Attachment:yes" can be abbreviated down to "a:y".
In my case, the attachment:yes bit is largely academic, since the large messages I have are mostly large by dint of their having attachments. I do have some large messages due to their containing embedded images. I can't offer you a way to filter on attachment size per se.
Whilst Expression Search is immediately visible in how it can supplement or replace the QuickFilter bar or the Global Search box, it also loans its enhancements to regular message filters.
I thank you for your detailed and very helpful reply.
The only point still not clear to me: why can't I access the attachment size information displayed in the attachment pane of Thunderbird? Obviously, Thunderbird gets and keeps this information.
Peter
From Edit/Find/Search Messages (Ctrl+Shift+F), select Size as the filter rule and enter 'is greater than' and a number like 6826 KB (see picture). Keep in mind that encoding overhead adds about 33% of the size of an attachment to the total size of a message, so a message with a 6MB attachment has a total size of 8MB. 'Save as Search Folder' if you perform this function frequently.
Or, even simpler, show the Size column (right-click any column button) and sort by Size (click the Size column button).
Modified
That's in fact what I did so far. But I had hoped to find a possibility to filter by the size of the attachments rather than the size of the whole messages - since I have many very long messages with inline pictures and the like.
Try the Attachment Search Tab add-on; it can filter by attachment type and name, and show the Sizes:
https://freeshell.de//~kaosmos/index-en.html#attachextratools
To install, drag the Download link and drop it onto Tools/Add-ons/Extensions in TB.
Thanks for the suggestion - but for my purposes this add-on has no advantage over the standard methods proposed above.
Chosen Solution
peterCH said
The only point still not clear to me: why can't I access the attachment size information displayed in the attachment pane of Thunderbird?
That information is compiled at the time the message is displayed, part of extracting the encoded text from the message, and discarded along with the display window when it is closed.