Searching for an Exact Email Address

Kevin Foley kevin at
Sun Feb 2 07:05:41 PST 2020

David Bremner <david at> writes:

> Also useful is setting NOTMUCH_DEBUG_QUERY in the environment. This will
> show the parsed Xapian query. In my case this shows both
> 'to:"example at"' and to:"example at" end up parsed the
> same way, so I guess the problem is elsewhere.

I should have mentioned that I tried using NOTMUCH_DEBUG_QUERY with many
different quoting variations and kept getting the same final query:

Query((Tmail AND (XTOexample at 1 PHRASE 3 XTOemail at 2 PHRASE 3 XTOcom at 3)))

It looks like the punctuation is being stripped; I get the same final
query for `notmuch search 'to:"example email com"'`.  Is this the
expected behavior?

David Bremner <david at> writes:

>  You can also do regex searches, although they are are measurably
>  slower. The syntax is also discussed in notmuch-search-terms(7).

I tried this as well but per notmuch-search-terms(7) it looks like regex
isn't supported for the "to" field.

Also as a side note, I don't think the quoting is necessary as per the
"searching" documentation [0], "... e-mail addresses are also treated as



More information about the notmuch mailing list