Mozilla will shut down Pocket’s services on July 8, 2025. At that time users will no longer be able to access the Pocket website, apps and API. You can export your saved items and API data until October 8, 2025 before they are permanently removed. For more information, see this article.

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Global search stopped working

I've been using Thunderbird for 3 to 5 email accounts for about 10 years, now up to date with v 52.5.2

For the past two months, search hasn't been working. Even for emails that I know are there, search will give blank results or misdirect to some other email. I found a Mozilla page saying I should delete the "global-messages-db.sqlite file in your Thunderbird Profile." I vaguely remember doing this successfully, years ago once when it happened before, but this time when I search my Mac, I can't find any file called global-messages-db.sqlite.

It's possible that with 10 years of email piled up, that it's just overloaded. I tried to delete obvious junk and stuff with attachments. If you think that could be my problem, do you have any suggestions on how to reduce, without blindly deleting all my email records?

Or do I have to delete the sqlite file, but it can't be found by simply searching in the finder? Then how?

Thank you, I'm really looking like a flake in my work these days, because I can't find people's emails or my own previous replies!

I've been using Thunderbird for 3 to 5 email accounts for about 10 years, now up to date with v 52.5.2 For the past two months, search hasn't been working. Even for emails that I know are there, search will give blank results or misdirect to some other email. I found a Mozilla page saying I should delete the "global-messages-db.sqlite file in your Thunderbird Profile." I vaguely remember doing this successfully, years ago once when it happened before, but this time when I search my Mac, I can't find any file called global-messages-db.sqlite. It's possible that with 10 years of email piled up, that it's just overloaded. I tried to delete obvious junk and stuff with attachments. If you think that could be my problem, do you have any suggestions on how to reduce, without blindly deleting all my email records? Or do I have to delete the sqlite file, but it can't be found by simply searching in the finder? Then how? Thank you, I'm really looking like a flake in my work these days, because I can't find people's emails or my own previous replies!

Chosen solution

Help menu > troubleshooting information. Click the show button for the profile. Close Thunderbird Delete the file.

If that route does not have the file, perhaps you turned the global search off in Options/Preferences >Advanced > general

Read this answer in context 👍 3

All Replies (16)

Chosen Solution

Help menu > troubleshooting information. Click the show button for the profile. Close Thunderbird Delete the file.

If that route does not have the file, perhaps you turned the global search off in Options/Preferences >Advanced > general

Thank you! That found the global-messages-db.sqlite for me in the Finder, and I deleted it and restarted Thunderbird.

Now I've opened Tools > Activity Monitor, and Thunderbird appears to be quickly indexing all my folders again. I've searched for a few things and it already seems to be working perfectly.

I think that's solved it, thank you!

Modified by BeckyLadakh

BeckyLadakh said

I've been using Thunderbird for 3 to 5 email accounts for about 10 years, now up to date with v 52.5.2 For the past two months, search hasn't been working. Even for emails that I know are there, search will give blank results or misdirect to some other email. I found a Mozilla page saying I should delete the "global-messages-db.sqlite file in your Thunderbird Profile." I vaguely remember doing this successfully, years ago once when it happened before, but this time when I search my Mac, I can't find any file called global-messages-db.sqlite. It's possible that with 10 years of email piled up, that it's just overloaded. I tried to delete obvious junk and stuff with attachments. If you think that could be my problem, do you have any suggestions on how to reduce, without blindly deleting all my email records? Or do I have to delete the sqlite file, but it can't be found by simply searching in the finder? Then how? Thank you, I'm really looking like a flake in my work these days, because I can't find people's emails or my own previous replies!

I also have been using Thunderbird for many years and have a large inventory of email sorted into a bunch of folders. I am using Version 52.6.0 on a Mac. Search is definitely broken. I have noticed this problem in the past 6 months.

I have done all the things suggested in this thread including enabling global search, deleting the search index file, etc. But it is very clear even if I search a specific folder using the quick search toolbar interface, it is not finding things it should.

If I got to the Gmail web interface, I can however find these items. I have also manually verified that they are present.

So something is not quite right recently with search. I would appreciate any help anyone can provide. I use email heavily and rely on search heavily.

Note that the problem seems to be with searching the body of a message for keywords. Subject and sender searches seem to work fine. But it is definitely not finding messages with single search terms, especially in my Sent Mail and Received Mail folders.

Deleting global-messages-db.sqlite doesn't always work, or if it does, it doesn't work for long.

And, it's not a great workaround because TB forgets about all my favorited folders.

Currently Global Search is working for my particular case, but Find/Search Messages under the Edit menu is not.

This is sometimes reversed.

I don't remember search ever working reliably in TB (15+ years of using it).

Maybe the devs need a big testcase? Or a corrupted global-messages-db.sqlite to look at?

gbell12 said

Deleting global-messages-db.sqlite doesn't always work, or if it does, it doesn't work for long. And, it's not a great workaround because TB forgets about all my favorited folders. Currently Global Search is working for my particular case, but Find/Search Messages under the Edit menu is not. This is sometimes reversed. I don't remember search ever working reliably in TB (15+ years of using it). Maybe the devs need a big testcase? Or a corrupted global-messages-db.sqlite to look at?


I find search extremely reliable. but I am also aware of it's limitations. It is a pig for searching numbers and a number of other things that are basically ignored by the indexer. This was a choice made by the developer that implemented it. So your mileage might have a lot to do with the type of searches you do.

Having said that, Thunderbird is extremely sensitive to timing issues and having the Profile folder scanned by an anti virus product is often enough to see SQL updates to the database fail. So we recommend that the profile folders only be scanned when a full system scan in undertaken, not through on access or on update.

We also see issues with search generally from anti virus. They delete the mail messages but leave the index, so you have mails showing in the user interface that simply no longer exist. Very messy. Recommend no automatic fixing of files in a Thunderbird profile. Automatic fix translates as delete and sometimes a forensic overwrite to prevent any chance of recovering the file. Other times it is just quarantined, but Un-quarantining the file removes latter emails so it is just a mess.

Ignore mail in IMAP accounts where local storage of message is not selected. I find the IMAP search on server option to be somewhat flaky. But as I only have one account where local storage is not selected It does not make much impact.

Use the compact on the file menu to determine exactly what mail you really have. Lots of folk think they have more than they really have because of indexing issues and corrupt store files.

Matt said

I find search extremely reliable.

Well then we have a mystery :)

A Google search yields lots of (and years of) people having this problem.

but I am also aware of it's limitations.

"limitations" is an interesting word choice :) I would also like to understand these so that I have your same experience with searches.

It is a pig for searching numbers

Hmmm... I'll have to start keeping track.

This particular case was just a word, but looking at the actual mail file, it's probably because the message is smime.p7m encrypted. Not sure if this was intentional decision on TB's part to always leave it encrypted on disk maybe. But since it can display the message, shouldn't it be able to search it? (raw, not indexed, I'd guess).

and a number of other things that are basically ignored by the indexer.

Are those documented anywhere?

Thunderbird is extremely sensitive to timing issues and having the Profile folder scanned by an anti virus product

On Linux, not running A-V.

We also see issues with search generally from anti virus. They delete the mail messages but leave the index, so you have mails showing in the user interface that simply no longer exist. Very messy.

Yuck, so they're quarantining individual messages (because they can read the mbox format). TB needs to detect a file change and reindex?

What does Outlook do about this?

Ignore mail in IMAP accounts where local storage of message is not selected.

Also not my issue. Locally stored.

Thanks for the detailed explanation Matt. But remember, search not finding things has been my experience for many many years. I often resort to grep from the command line. I don't think I'm often searching for numbers, but maybe I am. I'll have to pay more attention next time I have the problem.

Modified by gbell12

It is nice to see this discussion. I use TB on a Mac with no virus protection and an IMAP server. I also keep folders of older email on my laptop and only the last year or two on the IMAP server due to space limitations. I have all my email since 2004 - a fairly large archive.

Search simply does not work as I commented before. Google search using the gmail web interface finds many more matches (and finds them faster).

For me it is a real problem because I can't search the mail local to my laptop, for which I must use TB, and I can't store all my mail on the IMAP server.

Modified by Joseph Picone

picone said

Search simply does work as I commented before.

Does or does not?

gbell12 said

picone said
Search simply does work as I commented before.

Does or does not?

Sorry about that: "Search simply does not work..."

For me at least, this seems fairly recent (Mac, High Sierra v10.13.3, TB v52.6.0) - maybe 6 months to a year ago. I am having a number of issues with TB now. I am beginning to think they are related to the size of my email archive.

My archive is 4 GB - no large attachments. So maybe picone and I are onto something there?

What we need are more clues for the devs to go on. What type of search (Ctrl-K, Ctrl-Shift-F), what is searched, when does it fail, what fixes it...

Then the next problem is creating a small testcase devoid of personal information - which is unlikely! So next best would be a dev screensharing with me or picone (if they're amenable to that) to dig a little deeper. Any devs interested in that?

If someone's about to hop on me for hijacking the thread, this is on the original topic (just broader), and I'm happy to move the discussion as long as it's somewhere this lively.

one "limitation" is that the indexer does not index any quoted prior emails, only text that is new to that particular email. When you do get a result, the view in conversation is a good reference, but it makes locating email tat were forwarded very hard.

encrypted emails are not searched https://bugzilla.mozilla.org/show_bug.cgi?id=188988


There is a meta bug for all Gloda (global search) bugs. https://bugzilla.mozilla.org/show_bug.cgi?id=541349

There is also a meta bug for non Gloda search. https://bugzilla.mozilla.org/show_bug.cgi?id=519202

Note the bugs listed as Depends on: those with a strike through are fixed. Those without are open.

Very interesting, thanks Matt.

Most of the referenced bugs are very specific and not my case (eg. funny charsets, doesn't update results when new mail comes in).

The most interesting one was https://bugzilla.mozilla.org/show_bug.cgi?id=481616 "fails to find text after an = sign"

I'll have to do some digging. I haven't before because it's always been such a widespread problem (according to Google), that I've always figured someone was working on it (which they are, but maybe not whatever's happening in my case).

I might be willing to do a screenshare as part of a Skype/Hangout session. Prior to that I would have to prepare some test cases to demonstrate the problem, so I need some advance notice.

I am more than willing to help isolate the problem.

Just wanted to follow up and say that the problem still persists and it seems to be getting worse. I am now regularly using Gmail to search. That is really sad since I hate the Gmail interface. But TB searching just doesn't seem to work - it misses too much stuff. This ins't a subtle thing - the difference in search engine accuracy is pretty significant.

I deleted my sqlite file in the hopes that re-indexing will fix this. Note sure. We will see.

-Joe

I have re-indexed my mail. Unfortunately, the same old problems.

In TB, I entered a multiword phrase in the quick search function (e.g., "my most recent post"). There was one and only one email that had this exact phrase in it. TB failed to find that email and came back with about 20 false positives. When I double quoted the entire string, it produced no matches. However, when I used the global search function, it found the right message.

The same search in gmail produced two hits. The first one was the correct email message while the second one contained the words somewhere in the message. When I added double quotes around the phrase, it produced only one match - the correct match.

I have always used the quick filter function since I like the interface. The global search function is a less useful interface. However, it seems like global search is working once you re-index.

Any idea why the quick filter search is not working?

-Joe