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