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 C4C7140DEFA for ; Wed, 17 Nov 2010 14:08:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.03 X-Spam-Level: X-Spam-Status: No, score=0.03 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1.929, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no 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 Xs0elegNI0it for ; Wed, 17 Nov 2010 14:08:09 -0800 (PST) Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by olra.theworths.org (Postfix) with ESMTP id 3CBC640DEF4 for ; Wed, 17 Nov 2010 14:08:07 -0800 (PST) Received: from racin (unknown [82.239.207.166]) by smtp3-g21.free.fr (Postfix) with ESMTP id 90942A6228 for ; Wed, 17 Nov 2010 23:08:03 +0100 (CET) From: Matthieu Lemerre To: notmuch@notmuchmail.org Subject: Warning when GMime is parsing broken email addresses User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Wed, 17 Nov 2010 23:20:26 +0100 Message-ID: <87ipzvk2xh.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: Wed, 17 Nov 2010 22:08:19 -0000 Hi, I just realized that GMime is not robust to some broken email addresses sent by broken email clients. I received a mail, with the to field being xxxx.yyyy The email client (Exchange) had forgotten to put a "" around "xxxx.yyyy", which is necessary because `.' is a special character, and this confused GMime. This resulted in notmuch storing xxxx.yyyy as the email address, instead of using uuuu-vvvv@gmail.com. Because of that I had trouble finding one of my mail using a to: in the search terms. I have filed a bug report for GMime (https://bugzilla.gnome.org/show_bug.cgi?id=545333), but I just wanted to make people using notmuch aware of this problem, because I guess that such problems might be extremely common. 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... Matthieu