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 247D5429E2C for ; Fri, 13 May 2011 15:24:51 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] 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 F96d4yfmBAwg for ; Fri, 13 May 2011 15:24:49 -0700 (PDT) Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by olra.theworths.org (Postfix) with ESMTP id 6BF5F431FD0 for ; Fri, 13 May 2011 15:24:47 -0700 (PDT) Received: from racin (unknown [82.239.207.166]) by smtp3-g21.free.fr (Postfix) with ESMTP id 1C5B8A61C9; Sat, 14 May 2011 00:24:35 +0200 (CEST) From: Matthieu Lemerre To: Pieter Praet , Xavier Maillard , Carl Worth , notmuch@notmuchmail.org Subject: Re: Warning when GMime is parsing broken email addresses In-Reply-To: <87r58n8nzm.fsf@praet.org> References: <87ipzvk2xh.fsf@free.fr> <877hai3r82.fsf@yoom.home.cworth.org> <87r58n8nzm.fsf@praet.org> User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Sat, 14 May 2011 00:33:31 +0200 Message-ID: <87aaeq1b9g.fsf@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 13 May 2011 22:24:51 -0000 On Wed, 27 Apr 2011 21:59:09 +0200, Pieter Praet wrote: > On Wed, 27 Apr 2011 18:30:09 +0200, Xavier Maillard wrote: > > On Mon, 25 Apr 2011 15:23:41 -0700, Carl Worth wrote: > > > On Wed, 17 Nov 2010 23:20:26 +0100, Matthieu Lemerre wrote: > > > > Maybe it would also be interesting to add a warning/assertion to check > > > > that all email adresses added to the database are correct email > > > > addresses? I.e. check that the `addr' variable in _index_address_mailbox > > > > always has a @. This check is in fact already done using the function > > > > strchr, but a bad value is explicitly ignored... > > > > > > Since GMime is fixed upstream (as of version 2.4.18) another option > > > would be to simply make the notmuch build system require a sufficiently > > > new version of GMime in order to build. > > > > > > What do you think? > > I'd say both. > > Unfortunately, regressions are not uncommon, and regardless, it'd be > nice to be notified when what we stuff in the db is not sane. > > It would however be a good idea IMHO to check email address more > thorougly [1] than simply verifying whether an "@" is present. I agree with that, unless it is undesirable to add a dependency to a regex library to notmuch? If so, the @ check could still be done (and is _already_ present). I don't see the warnings either, but maybe with proper differentiation between stdout and stderr, I could arrange to print stderr and see the warning messages in emacs when I explicitely launch my mail synchronization script. Matthieu