From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id CA3FA6DE0178 for ; Sun, 2 Feb 2020 07:06:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.034 X-Spam-Level: X-Spam-Status: No, score=-1.034 tagged_above=-999 required=5 tests=[AWL=-0.333, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oC80xNC-GK0c for ; Sun, 2 Feb 2020 07:06:00 -0800 (PST) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by arlo.cworth.org (Postfix) with ESMTPS id BDBF86DE0172 for ; Sun, 2 Feb 2020 07:05:58 -0800 (PST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 489Z5v5Ml5zQlCh; Sun, 2 Feb 2020 16:05:55 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id ByOjbS45YDR9; Sun, 2 Feb 2020 16:05:49 +0100 (CET) From: Kevin Foley To: David Bremner , Teemu Likonen , notmuch@notmuchmail.org Subject: Re: Searching for an Exact Email Address In-Reply-To: <87a761kwtg.fsf@tethera.net> References: <87pnexbjq5.fsf@iki.fi> <87a761kwtg.fsf@tethera.net> Date: Sun, 02 Feb 2020 10:05:41 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2020 15:06:00 -0000 David Bremner 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@email.com"' and to:"example@email.com" 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@1 PHRASE 3 XTOemail@2 PHRASE 3 XTOcom@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 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 phrases.". Kevin [0] https://notmuchmail.org/searching/