Re: Handling Email Addresses Without Name

Subject: Re: Handling Email Addresses Without Name

Date: Sat, 15 Jan 2022 09:01:47 -0400

To: Kevin Foley, notmuch@notmuchmail.org

Cc:

From: David Bremner


Kevin Foley <kevin@kevinjfoley.me> writes:

> I realized I have a few messages, where the "from" address is missing a
> name.  For example, the from header is "jdoe@example.com" instead of
> "John Doe <jdoe@example.com>", which means the message won't show up if
> I search "from:John".
>
> Is there anyway to handle this?  Perhaps someway to annotate these
> messages so they would show up when searching "from:John"?

If you have want you can define a query

$ notmuch config set query.John from:jdoe@example.com

Then you can use

$ notmuch search query:John

----------------------------------------------------------------------
The next part is just me thinking out loud, not really an answer to the
original question.

Xapian has a synonym facility [1], but it is not currently used by
notmuch. This would work well for this particular application, but
(unlike query) it ORs the original term into the expansion (as makes
sense for synonyms). That would make it less useful for cases like
"from:me", where the query would match a literal "me" in the from
field. Thanks to Apple's cloud thingy, that actually matches quite a
lot.

[1]: https://xapian.org/docs/synonyms.html
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: