unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Handling Email Addresses Without Name
@ 2022-01-14 21:54 Kevin Foley
  2022-01-15 12:15 ` Ralph Seichter
  2022-01-15 13:01 ` David Bremner
  0 siblings, 2 replies; 8+ messages in thread
From: Kevin Foley @ 2022-01-14 21:54 UTC (permalink / raw)
  To: notmuch

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"?

Thanks,
Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Handling Email Addresses Without Name
  2022-01-14 21:54 Handling Email Addresses Without Name Kevin Foley
@ 2022-01-15 12:15 ` Ralph Seichter
  2022-01-17 15:05   ` Kevin Foley
  2022-01-15 13:01 ` David Bremner
  1 sibling, 1 reply; 8+ messages in thread
From: Ralph Seichter @ 2022-01-15 12:15 UTC (permalink / raw)
  To: notmuch

* Kevin Foley:

> 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".

Using "from:jdoe" as a search term will match both variants.

-Ralph

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Handling Email Addresses Without Name
  2022-01-14 21:54 Handling Email Addresses Without Name Kevin Foley
  2022-01-15 12:15 ` Ralph Seichter
@ 2022-01-15 13:01 ` David Bremner
  2022-01-17 15:20   ` Kevin Foley
  1 sibling, 1 reply; 8+ messages in thread
From: David Bremner @ 2022-01-15 13:01 UTC (permalink / raw)
  To: Kevin Foley, notmuch

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Handling Email Addresses Without Name
  2022-01-15 12:15 ` Ralph Seichter
@ 2022-01-17 15:05   ` Kevin Foley
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin Foley @ 2022-01-17 15:05 UTC (permalink / raw)
  To: Ralph Seichter, notmuch

Ralph Seichter <ralph@ml.seichter.de> writes:

> Using "from:jdoe" as a search term will match both variants.

True, however this is a simplified example.  In practice, sometimes the
emails will be j.doe@example.com or something like this.

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Handling Email Addresses Without Name
  2022-01-15 13:01 ` David Bremner
@ 2022-01-17 15:20   ` Kevin Foley
  2022-01-17 18:14     ` David Bremner
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Foley @ 2022-01-17 15:20 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:

> 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

This isn't ideal as I'd prefer not to have to remember to use a query
instead of "from".  However, I didn't know about the predefined query
feature so that's cool to see.

> 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

This could be interesting.  I actually do something write now in my post
new hook script where I get all versions of my email address (I at one
time used an address based on each website) and update the value of
`user.other_email`.

If there was the ability to assign synonyms I might be able to do
something similar.  It would depend what the interface was like I
suppose.  For example, what if I wanted to connect "John", "John Doe",
and "Doe" to "jdoe@example.com"?  I'm guessing based on the Xapian docs
that would end up being 3 different calls.

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Handling Email Addresses Without Name
  2022-01-17 15:20   ` Kevin Foley
@ 2022-01-17 18:14     ` David Bremner
  2022-01-17 20:57       ` Kevin Foley
  2022-01-18 13:15       ` Gregor Zattler
  0 siblings, 2 replies; 8+ messages in thread
From: David Bremner @ 2022-01-17 18:14 UTC (permalink / raw)
  To: Kevin Foley, notmuch

Kevin Foley <kevin@kevinjfoley.me> writes:

>
> If there was the ability to assign synonyms I might be able to do
> something similar.  It would depend what the interface was like I
> suppose.  For example, what if I wanted to connect "John", "John Doe",
> and "Doe" to "jdoe@example.com"?  I'm guessing based on the Xapian docs
> that would end up being 3 different calls.
>

Yes, 3 different Xapian calls would be needed, but I don't think that
needs to determine the (completely hypothetical at this point) notmuch
interface.

d

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Handling Email Addresses Without Name
  2022-01-17 18:14     ` David Bremner
@ 2022-01-17 20:57       ` Kevin Foley
  2022-01-18 13:15       ` Gregor Zattler
  1 sibling, 0 replies; 8+ messages in thread
From: Kevin Foley @ 2022-01-17 20:57 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:

> Yes, 3 different Xapian calls would be needed, but I don't think that
> needs to determine the (completely hypothetical at this point) notmuch
> interface.

That's a good point.  I think that would work for my use case and
potentially the Apple email one you mentioned (assuming there's some way
to identify those).  I totally understand it's just hypothetical at this
point though.

Thanks,
Kevin 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Handling Email Addresses Without Name
  2022-01-17 18:14     ` David Bremner
  2022-01-17 20:57       ` Kevin Foley
@ 2022-01-18 13:15       ` Gregor Zattler
  1 sibling, 0 replies; 8+ messages in thread
From: Gregor Zattler @ 2022-01-18 13:15 UTC (permalink / raw)
  To: notmuch

Hi David, Kevin, notmuch developers,
* David Bremner <david@tethera.net> [2022-01-17; 14:14]:
> Kevin Foley <kevin@kevinjfoley.me> writes:
>> If there was the ability to assign synonyms I might be able to do
>> something similar.  It would depend what the interface was like I
>> suppose.  For example, what if I wanted to connect "John", "John Doe",
>> and "Doe" to "jdoe@example.com"?  I'm guessing based on the Xapian docs
>> that would end up being 3 different calls.
>>
>
> Yes, 3 different Xapian calls would be needed, but I don't think that
> needs to determine the (completely hypothetical at this point) notmuch
> interface.

that hypothetical notmuch interface could automagically use
/ integrate message modes mail aliases.


Mutt allows for using alias in filter queries and for
jumping to mail folders.  That's nice.


Ciao; Gregor
--
 -... --- .-. . -.. ..--.. ...-.-

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-18 13:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 21:54 Handling Email Addresses Without Name Kevin Foley
2022-01-15 12:15 ` Ralph Seichter
2022-01-17 15:05   ` Kevin Foley
2022-01-15 13:01 ` David Bremner
2022-01-17 15:20   ` Kevin Foley
2022-01-17 18:14     ` David Bremner
2022-01-17 20:57       ` Kevin Foley
2022-01-18 13:15       ` Gregor Zattler

Code repositories for project(s) associated with this inbox:

	notmuch.git.git (no URL configured)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).