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 C9102431FD0 for ; Mon, 16 May 2011 19:10:35 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 Q3paqY7YYbqj for ; Mon, 16 May 2011 19:10:35 -0700 (PDT) Received: from kaylee.flamingspork.com (kaylee.flamingspork.com [74.207.245.61]) by olra.theworths.org (Postfix) with ESMTP id 6CD4C431FB6 for ; Mon, 16 May 2011 19:10:35 -0700 (PDT) Received: from willster.flamingspork.com (localhost [127.0.0.1]) by kaylee.flamingspork.com (Postfix) with ESMTPS id 3AAA7609E for ; Tue, 17 May 2011 02:10:09 +0000 (UTC) Received: by willster.flamingspork.com (Postfix, from userid 1000) id C65DF492D5; Tue, 17 May 2011 12:10:32 +1000 (EST) From: Stewart Smith To: notmuch Subject: [BUG] [PATCH] Fix appending of Received headers User-Agent: Notmuch/0.5-93-g5e4ed5b (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 17 May 2011 12:10:32 +1000 Message-ID: <878vu6ulev.fsf@flamingspork.com> 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: Tue, 17 May 2011 02:10:35 -0000 We're not properly concatenating the Received headers if we parse them while requesting a header that isn't Received. this fixes notmuch-reply address detection in a bunch of situations. diff --git a/lib/message-file.c b/lib/message-file.c index 7722832..dd0f698 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -329,7 +329,7 @@ notmuch_message_file_get_header (notmuch_message_file_t *message, /* we treat the Received: header special - we want to concat ALL of * the Received: headers we encounter. * for everything else we return the first instance of a header */ - if (is_received) { + if (strcasecmp(header, "received") == 0) { if (header_sofar == NULL) { /* first Received: header we encountered; just add it */ g_hash_table_insert (message->headers, header, decoded_value); -- Stewart Smith