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 46A7C6DE092B for ; Sat, 1 Feb 2020 16:38:39 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.066 X-Spam-Level: X-Spam-Status: No, score=-0.066 tagged_above=-999 required=5 tests=[AWL=-0.065, 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 YftBNBP_PcgO for ; Sat, 1 Feb 2020 16:38:38 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 254226DE0262 for ; Sat, 1 Feb 2020 16:38:38 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1iy3HV-0000Si-6G; Sat, 01 Feb 2020 19:38:33 -0500 Received: (nullmailer pid 1776561 invoked by uid 1000); Sun, 02 Feb 2020 00:38:32 -0000 From: David Bremner To: Kevin Foley , notmuch@notmuchmail.org Subject: Re: Searching for an Exact Email Address In-Reply-To: References: Date: Sat, 01 Feb 2020 20:38:32 -0400 Message-ID: <87d0axlt6f.fsf@tethera.net> 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 00:38:39 -0000 Kevin Foley writes: > Hi, > > I'm getting unexpected results when trying to search for messages > associated with an email address. > > An example search is: > > $ notmuch search to:"example@email.com" See the subsection Quoting in notmuch-search-terms(7). I suspect you need to double-quote your query, as the examples in the documentation are. > > which is returning messages that seem to have nothing to do with the > address I'm looking for. > > My understanding is this should be treated as a phrase which means that > exact phrase will be searched for, is this correct? If not is there a > way to search for an exact email address in the to field? > You can also do regex searches, although they are are measurably slower. The syntax is also discussed in notmuch-search-terms(7).