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 91A074196F3 for ; Mon, 12 Apr 2010 11:44:38 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -4.2 X-Spam-Level: X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham 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 NFg2j29EiPOn for ; Mon, 12 Apr 2010 11:44:37 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by olra.theworths.org (Postfix) with ESMTP id CB33C431FC1 for ; Mon, 12 Apr 2010 11:44:37 -0700 (PDT) Received: from localhost ([::1] helo=localhost.localdomain) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1O1OcZ-0006rl-Ke; Mon, 12 Apr 2010 18:44:32 +0000 Received: by localhost.localdomain (Postfix, from userid 500) id 0C762C005D; Mon, 12 Apr 2010 08:53:15 -0700 (PDT) From: Dirk Hohndel To: Tomas Carnecky Subject: Re: Use of strcasestr In-Reply-To: <4BC326F2.10300@dbservice.com> References: <4BC326F2.10300@dbservice.com> Date: Mon, 12 Apr 2010 08:53:14 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Cc: notmuch 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: Mon, 12 Apr 2010 18:44:38 -0000 On Mon, 12 Apr 2010 15:58:10 +0200, Tomas Carnecky wrote: > In 4fd9ea0 (guess From address from Received headers, 2010-04-06) you > introduced strcasestr, which is not portable, see 82e47ec (notmuch > reply: Use strstr instead of strcasestr for portability., 2010-02-04). > > Is strcasestr really necessary there or can it be replaced with strstr? Well, I'm trying to make sure that rAndOm case in email addresses doesn't throw of the matching - it's quite common for people to write email addresses as First.Last@Company.Com - the RFCs that I've seen (can't double check, on a plane right now) seem to indicate that you can't rely on the headers being lowercase - so even preprocessing the configured email addresses might not be enough. I guess we could selectively force some of the headers to be stored as lower case - Received, X-Original-To, Envelope-To in my case - but that seems wrong somehow. Open to better ideas... /D -- Dirk Hohndel Intel Open Source Technology Center