Searching for Messages with Images

User Help for Mozilla Thunderbird
Post Reply
BorgInvasionReturns
Posts: 64
Joined: April 20th, 2015, 6:27 pm

Searching for Messages with Images

Post by BorgInvasionReturns »

I have found using ATTACHMENT SEARCH TAB from https://freeshell.de//~kaosmos/index-en.html I can search for emails with attachments. A bit buggy but works. I guess. Not like I found the hundreds of emails I am looking for just yet. I need time.
However, I can not find a way to search for emails that have images embedded/inlined. I have hundreds in tons of subfolders, but other than sorting by size and opening each one which will take time, I rather find an easier way.
I have done some searches but looking for some fresh suggestions anyone may have on how to easy find emails with such images in them.
Thank you.
BorgInvasionReturns
Posts: 64
Joined: April 20th, 2015, 6:27 pm

Re: Searching for Messages with Images

Post by BorgInvasionReturns »

Hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
User avatar
DanRaisch
Moderator
Posts: 127187
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Searching for Messages with Images

Post by DanRaisch »

Moving to Thunderbird Support.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Searching for Messages with Images

Post by tanstaafl »

Look at the raw message source using Control-U or view -> message source for an example of something you'd like to search for, and then search the "Body" for it. If you are using a IMAP account you used to need to add a custom header for Body to search the message body. That is built-in with version 60, I'm not sure what version it got added.

http://kb.mozillazine.org/Custom_headers
http://kb.mozillazine.org/Message_Filters

If I want it to find all images such as <img src="https://www.accountonline.com/cards/svc ... curity.gif" width="26" height="20" alt="Email Security Zone" border="0" /> I search the message body using "edit -> find -> search messages", select "Body" "contains" and enter "img src" (without the quotes)

If you want to find a embedded image I'd try searching for src="cid: (still viable, but dated) and base64, (the comma is needed to avoid finding it used in a Content-Transfer-Encoding: header, you want to find it used as a argument by img src) and data:image (if it uses a data URI). Look at several of the messages to figure out if you need to test for all three methods or can you get by with just one.

See https://marketingland.com/embedding-ima ... ues-228814
https://stackoverflow.com/questions/120 ... e64-images
https://dopiaza.org/tools/datauri/examples/index.php
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Searching for Messages with Images

Post by tanstaafl »

I suspect the attachment search add-on only lets you search the contents of attachments. Real attachments are not considered part of the body. For a long time a search in Thunderbird would ignore them, but in version 60 it will find them when you search the Body. Embedded images (aka inline attachments) are part of the message body, so I wouldn't expect that add-on to help find them unless they used a cid: in the img src statement.

Have you considered doing a search for all messages that do not have an attachment and then sorting based on size? That wont help find small embedded images but I assume your main concern is finding messages with large embedded images. You could test whether the body contained Content-Disposition: attachment; to see if it has any attachments. You might have some messages with both real attachments and embedded images but that's good enough for a first pass.
BorgInvasionReturns
Posts: 64
Joined: April 20th, 2015, 6:27 pm

Re: Searching for Messages with Images

Post by BorgInvasionReturns »

I have been doing that by size, but many emails are also that large in size without any images in them. Just all text. Plus, a hundred subfolders and thousands of emails spanning years.

I found a common word to match some emails I am looking for. "Inline." However, I did search for it and got results without images in them and some I tested with images did not even show up. Along with any other keywords like ones you mentioned and I tried as well. Just not fully accurate.

You think this would be easy? Well, I do anything. I am still stuck in a more streamlined future, and yes, we have more trees thankfully than there are now.

I think what I may end up doing, once I can, is install a separate copy of Thunderbird on another system, copy my current mail database, and go through them one by one by size as I mentioned before, able to delete what I already went through.

Yea....
Post Reply