Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DB4A7431FB6 for ; Fri, 25 Feb 2011 12:57:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8A21T+D95Qfq for ; Fri, 25 Feb 2011 12:57:31 -0800 (PST) Received: from VA3EHSOBE007.bigfish.com (va3ehsobe006.messaging.microsoft.com [216.32.180.16]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 037DD431FB5 for ; Fri, 25 Feb 2011 12:57:30 -0800 (PST) Received: from mail63-va3-R.bigfish.com (10.7.14.242) by VA3EHSOBE007.bigfish.com (10.7.40.11) with Microsoft SMTP Server id 14.1.225.8; Fri, 25 Feb 2011 20:57:29 +0000 Received: from mail63-va3 (localhost.localdomain [127.0.0.1]) by mail63-va3-R.bigfish.com (Postfix) with ESMTP id DA11FA38343; Fri, 25 Feb 2011 20:57:28 +0000 (UTC) X-SpamScore: -11 X-BigFish: VPS-11(zz1432N98dNzz1202hzz8275bh8275chz32i637h668h736h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:ausb3twp02.amd.com; RD:none; EFVD:NLI Received: from mail63-va3 (localhost.localdomain [127.0.0.1]) by mail63-va3 (MessageSwitch) id 1298667448567442_6944; Fri, 25 Feb 2011 20:57:28 +0000 (UTC) Received: from VA3EHSMHS017.bigfish.com (unknown [10.7.14.253]) by mail63-va3.bigfish.com (Postfix) with ESMTP id 7967B22804E; Fri, 25 Feb 2011 20:57:28 +0000 (UTC) Received: from ausb3twp02.amd.com (163.181.249.109) by VA3EHSMHS017.bigfish.com (10.7.99.27) with Microsoft SMTP Server id 14.1.225.8; Fri, 25 Feb 2011 20:57:28 +0000 X-WSS-ID: 0LH6Y7N-02-OCY-02 X-M-MSG: Received: from sausexedgep02.amd.com (sausexedgep02-ext.amd.com [163.181.249.73]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 2A53DC882F; Fri, 25 Feb 2011 14:57:22 -0600 (CST) Received: from sausexhtp02.amd.com (163.181.3.152) by sausexedgep02.amd.com (163.181.36.59) with Microsoft SMTP Server (TLS) id 8.3.106.1; Fri, 25 Feb 2011 15:03:22 -0600 Received: from optimon.amd.com (163.181.34.104) by sausexhtp02.amd.com (163.181.3.152) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 25 Feb 2011 14:57:27 -0600 Received: from mhdc-ns01.amd.com (mhdc-ns01.amd.com [165.204.35.147]) by optimon.amd.com (8.12.10/8.12.10) with ESMTP id p1PKvQUv019715; Fri, 25 Feb 2011 14:57:27 -0600 Received: from testarossa.amd.com (testarossa.amd.com [165.204.147.44]) by mhdc-ns01.amd.com (8.13.8+Sun/8.13.8) with ESMTP id p1PKvQlX021659; Fri, 25 Feb 2011 13:57:26 -0700 (MST) Received: (from manderso@localhost) by testarossa.amd.com (8.13.1/8.13.1/Submit) id p1PKvNAi016333; Fri, 25 Feb 2011 13:57:23 -0700 X-Authentication-Warning: testarossa.amd.com: manderso set sender to MarkR.Anderson@amd.com using -f From: Mark Anderson To: Jameson Rollins , "notmuch@notmuchmail.org" Subject: Re: Strange match to my query In-Reply-To: <878vx4vuxi.fsf@servo.finestructure.net> References: <3wd4o8wa7fx.fsf@testarossa.amd.com> <878vx4vuxi.fsf@servo.finestructure.net> User-Agent: Notmuch/0.5-56-g74cb76a (http://notmuchmail.org) Emacs/23.1.1 (i686-pc-linux-gnu) Date: Fri, 25 Feb 2011 13:57:23 -0700 Message-ID: <3wd8vx3u91o.fsf@testarossa.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-OriginatorOrg: amd.com X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Fri, 25 Feb 2011 20:57:32 -0000 On Fri, 25 Feb 2011 12:19:21 -0600, Jameson Rollins wrote: > On Tue, 25 Jan 2011 16:29:22 -0700, Mark Anderson wrote: > > Apparently matching on email addresses doesn't work the way I hoped. > > > > While debugging why my to:x@y.com search was matching far too many > > entries, I whittled it down to this: > > > > WORD1=hello > > WORD2=goodbye > > MSGID=junk$(date +%s) > > TESTDIR=$(notmuch config get database.path)/.tmp/new > > TESTMAIL=$TESTDIR/$MSGID:2, > > > > mkdir -p $TESTDIR > > > > echo Testcase for $WORD1@$WORD2, msgid: $MSGID@junk.com > > > > echo "From: nobody@nobody.com > > To: c@${WORD1}.com, K-R@${WORD2}.com > > Date: Mon, 24 Jan 2011 23:41:34 -0600 > > Subject: Error > > Message-ID: <$MSGID@junk.com> > > > > Not empty body.= > > > > " > $TESTMAIL > > > > notmuch new > > notmuch search --output=files to:$WORD1@$WORD2 > > notmuch search --output=files to:\"$WORD1@$WORD2\" > > > > Why does that match, but this doesn't? > > > > notmuch search --output=files to:\'$WORD1@$WORD2\' > > Hey, guys. Reopening an old thread here, found while trying to track > down a similar problem. > > I'm confused why any of these searches should return anything at all. > "$WORD1@$WORD2" doesn't actually match either of the addresses in the > test message, especially when quoted. The expanded addresses should be: > > c@hello.com > K-R@goodbye.com > > Why should > > hello@goodbye > > match anything? And in fact it doesn't for me if I recreate the same > setup. Am I missing something? It shouldn't match anything, that's the value of finding this bug. What happened is the term counter was reset for each email address, so the term list for emails in "to:" looks something like this: 0 c K 1 hello R 2 com goodbye 3 com So it matched a hello at 1 and a goodbye at 2. I don't remember where the discussion on this went, but it was on the list. Perhaps you should search for it, it should take notmuch to find... *duck* -Mark