--- /dev/null
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 41FBD6DE178F\r
+ for <notmuch@notmuchmail.org>; Fri, 15 Jan 2016 10:48:10 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.025\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.025 tagged_above=-999 required=5\r
+ tests=[AWL=-0.025] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id W3WXUMWHHHad for <notmuch@notmuchmail.org>;\r
+ Fri, 15 Jan 2016 10:48:08 -0800 (PST)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 3781E6DE0A87\r
+ for <notmuch@notmuchmail.org>; Fri, 15 Jan 2016 10:48:07 -0800 (PST)\r
+Received: from fifthhorseman.net (unknown [38.109.115.130])\r
+ by che.mayfirst.org (Postfix) with ESMTPSA id A39D0F984;\r
+ Fri, 15 Jan 2016 13:47:53 -0500 (EST)\r
+Received: by fifthhorseman.net (Postfix, from userid 1000)\r
+ id 065F620024; Fri, 15 Jan 2016 10:47:52 -0800 (PST)\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+To: David Bremner <david@tethera.net>, Gaudenz Steinlin <gaudenz@debian.org>,\r
+ notmuch@notmuchmail.org, 810784@bugs.debian.org\r
+Subject: Re: [Gaudenz Steinlin] Bug#810784: should match email adress case\r
+ insensitive when sending encrypted mail\r
+In-Reply-To: <87egdm4ujh.fsf@tesseract.cs.unb.ca>\r
+References: <87egdm4ujh.fsf@tesseract.cs.unb.ca>\r
+User-Agent: Notmuch/0.21+66~g8c19a9a (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 15 Jan 2016 13:47:51 -0500\r
+Message-ID: <874mee7k88.fsf@alice.fifthhorseman.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 15 Jan 2016 18:48:10 -0000\r
+\r
+On Tue 2016-01-12 11:44:18 -0500, David Bremner wrote:\r
+> [gaudenz wrote:]\r
+>> When sending encrypted mail the key lookup to encrypt to is done case\r
+>> sensitive on the mail address. As mail addresses are case insensitive\r
+>> this should be done case insensitive. Otherwise keys for users which for\r
+>> some reason have uppercase letters in their email address in the key UID\r
+>> are not found.\r
+\r
+fwiw, i agree with gaudenz that this is the right thing to do, despite\r
+being a gray area.\r
+\r
+For the right-hand side of an e-mail address (the stuff after the @; the\r
+e-mail domain), the DNS label there is case-insensitive by definition.\r
+\r
+There may be some additional thinking to be done here when thinking\r
+about non-ASCII DNS labels in the RHS, though -- should we be\r
+normalizing the domain names in doing the search? using punycode?\r
+\r
+The stuff before the @ is a bit more problematic.\r
+\r
+According to the standards documents, the left-hand-side of an e-mail\r
+address (the "domain-specific" part) is up to the mail domain to parse\r
+and process. So it would not be a violation of the public\r
+specifications for the operator of the MX for example.org to provide\r
+three distinct mailboxes for alice@example.org and Alice@example.org and\r
+ALICE@example.org.\r
+\r
+However, i know of no mail providers that do so, and anyone proposing to\r
+do such a thing should have their head examined.\r
+\r
+Examining GnuPG's interface here, it looks like gpg already does\r
+case-insensitive matching when searching for an e-mail address\r
+surrounded by angle-brackets.\r
+\r
+So where is the case-insensitive lookup happening? Is this a bug in\r
+mml-mode, or in notmuch-emacs?\r
+\r
+ --dkg\r