![Thunderbird logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2024-02-12-07-36-53-599028_1.png)
Add header "Message-ID" in the search process
I am helping in this open-source project: https://github.com/garoose/copy-message-id
This addon started by Joshua helps to "copy" the Message-ID of any selected message in the clipboard.
Now, I want to be able to do the oposite: Locate a specific message provided I have the Message-ID.
The workflow behind is something like the following: I receive an email from a customer with important information. I then copy the Message-ID (screenshot step 1) to the clipboard and in the CRM you save something like "Peter compains about XXX by saying YYY on `Message-ID: 1234@xyz`". Months later, you need to get back to that specific email. You open up the CRM and find the customer's history. You now see the important email is `Message-ID: 1234@xyz`.
And now what? If I set `1234@xyz` in the search box (screenshot step 2), I can't find the message (screenshot step 3). While if I look for subject + from + date I can find it.
QUESTIONS
=
1. Is there any "native" way in Thunderbird to tell it to include the Message-ID header when doing the search?
2. If not, is there any production-ready add-on able to do this?
3. If not, where do I have to start reading to understand the "search API" callable from the Add-On?
I want to contribute to the mentioned Add-On but I don't know where to start to modify the search behaviour.
All Replies (9)
Usually, this done by adding a custom header to Classic Search (Ctrl+Shift+F). Click the criteria drop-down, that defaults to Subject, Customize..., and add Message-ID. Custom headers can also be added to filters.
Thanks @sfhowes. Your solution has a drawback: If you manage 50 accounts, you need to find account by account (unless I'm missing there's a way to do classical search on a system-wide manner to all the accounts in one single search), and that makes it unmanageable.
I'd like to customize the way you say but applied to the global search box (Ctrl+K).
Hints & tips?
Try a Saved Search, from File/New, and Choose... as many folders as necessary. Custom headers can be added the same way as in Classic Search.
Well... thanks for the proposed solutions but that's way too far (by many clicks) from productivity ideals.
We are integrating Message-ID as a day-to-day way to identify messages in our CRM and we want to be "instant search" when we have an ID to look for. An agent reads the CRM, finds a Message-ID and takes less than 3 seconds to get the email on the screen.
It should be as easy as "paste ID in the search + enter" and boom done as exactly we can do when searching for any keyword or sender or recipient. If I'm looking for "all my emails across all my accounts that contain the words [lion king] it takes 3 seconds to type `lion king` in the search box and hit enter. And I get all the answers instantly. If I get too many as it results `lion` _or_ `king` I just wrap into quotes `"lion king"` and boom done.
I'll be more than happy to code an add-on that seeks for `Message-ID` as well.
How can extend the general search (`CTRL+K`) bar? Couple of starting docs to read?
Thanks!
I don't know how to extend the Global Search, but if you use something like this add-on to copy the ID, it's very easy to paste it into a saved search or Classic Search, if Message-ID has already been added as a custom header. A saved search doesn't have to be configured each time it's applied.
Well...
In the very first sentence of my question I said I'm ACTUALLY working in this specific add-on you mention.
Telling a bunch of 10 customer-service agents (non-tech people) to customize their searches is a suicide even if the searches are reusable. It's simply not acceptable in a regular business.
I just want them to install the add-on and have it work. Now the add-on COPIES the message Id. I want it to COPY and SEARCH the Message ID.
I'm more than happy to code it, share it, contribute to it.
I'm **only** asking for the initial entry point to read.
Anyone reading this Q&A and knowing where to read to start extending the search bar, please let me know.
Sorry for the dupe... the first comment of the last couple was not published for some reason and then I re-wrote it. It appeared only the second one. Then, much afterwards, the first appeared in its time-place in the time-line. It seems it was in some kind of "queue" - just interpret both as a single one message.
I think you may get more advice about add-on development here:
Will look at that entry-point. Thanks @sfhowes