Strange match to my query
Jameson Rollins
jrollins at finestructure.net
Fri Feb 25 10:19:21 PST 2011
On Tue, 25 Jan 2011 16:29:22 -0700, Mark Anderson <MarkR.Anderson at amd.com> wrote:
> Apparently matching on email addresses doesn't work the way I hoped.
>
> While debugging why my to:x at 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 at junk.com
>
> echo "From: nobody at nobody.com
> To: c@${WORD1}.com, K-R@${WORD2}.com
> Date: Mon, 24 Jan 2011 23:41:34 -0600
> Subject: Error
> Message-ID: <$MSGID at 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 at hello.com
K-R at goodbye.com
Why should
hello at goodbye
match anything? And in fact it doesn't for me if I recreate the same
setup. Am I missing something?
jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110225/4bf266bb/attachment.pgp>
More information about the notmuch
mailing list