From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EEVrF8TF4mG/gwAAgWs5BA (envelope-from ) for ; Sat, 15 Jan 2022 14:01:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OLUCFcTF4mF8SgEA9RJhRA (envelope-from ) for ; Sat, 15 Jan 2022 14:01:56 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B29B33C5D2 for ; Sat, 15 Jan 2022 14:01:55 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7FFE15F712; Sat, 15 Jan 2022 13:01:51 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 68D315F468 for ; Sat, 15 Jan 2022 13:01:49 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 4C6915FC51; Sat, 15 Jan 2022 08:01:48 -0500 (EST) Received: (nullmailer pid 1610542 invoked by uid 1000); Sat, 15 Jan 2022 13:01:47 -0000 From: David Bremner To: Kevin Foley , notmuch@notmuchmail.org Subject: Re: Handling Email Addresses Without Name In-Reply-To: <87pmouyoea.fsf@kevinjfoley.me> References: <87pmouyoea.fsf@kevinjfoley.me> Date: Sat, 15 Jan 2022 09:01:47 -0400 Message-ID: <87lezhxidg.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 46JE6ZUCBM5KXMARH4PVZJE6JLI7EVAA X-Message-ID-Hash: 46JE6ZUCBM5KXMARH4PVZJE6JLI7EVAA X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642251716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=qskBTUzXCrebmT3mYXO3zBRq1w4sNpBSt/qz0gykaws=; b=AjQYGZ0+0tB8ecxXWHoWm4X3Hrrdkv8gDewNnysX+MoiDrjjqNMubTlth3Stm4tTrNSpwK e4XDUCTbzV5n7RRWFXtmdSssgNTwKI5QI62r8eAFhA6BoFRG96Qev4hGC7bKUGH0pIgcKR EslZiQa0liJkBOt3VnvW7ccNDVPNpwcUvWx8WyLyqRk6qTfqqoAEPCXkW/vBvAyMq6bX+B luXX4LB923+iMpeGNvIGHpx/2tsd7emW7HsHmkbLq84RB0P2NVpjZyKHelz/aMyMn/rNoC RJwall+Za65RVHoiooZeNNXoN5CLrbGwHqIoHl0fLn6fbxU9Hkd8Ii3Iw5Ixpw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642251716; a=rsa-sha256; cv=none; b=L7vFYmsWollKOChxctosEr2FtE5WJIZweX/rWdPNcGSx8RhOJ8cSRgxpEe2TQr3Uup3S7B ELhAqhmmFJS74RIsCyFDN5bXHjHALd4r8lSU4XFgVEnWsyEeU2rM74unYujAgqoLPvmEuT E9VFgVfhmbdOX7zoZART+xyfVWlbYrjHchXyLglKsKeZ03LOh1qhu/puEYUnmHAaIZNA/z HRoCAckHRRSiuvq7SWYIYuGhS88rHfBM+74TALEe3JFFmbIeuL8PqOeZSeFKQFuxaLpRd9 CjpYR1rTXm9Zwzg6h4Abm7sJTy8zeVuGh3w/GlQVEpayrDeTYsp3NQQl/Jq48A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.35 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: B29B33C5D2 X-Spam-Score: -2.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: DGR0xvXyJFwU Kevin Foley 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 ", 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