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 CDC1341A550 for ; Thu, 9 Dec 2010 14:33:02 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 JXEkVmeWCMiN for ; Thu, 9 Dec 2010 14:33:01 -0800 (PST) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by olra.theworths.org (Postfix) with ESMTP id DF7E641A552 for ; Thu, 9 Dec 2010 14:32:58 -0800 (PST) Received: by mail-bw0-f52.google.com with SMTP id 4so3710179bwz.39 for ; Thu, 09 Dec 2010 14:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=5z2UzA66VdyxO/DLhlTGYh6bU0sPuyxPPe+clGYmnvg=; b=Pzno3nxS/lDpLCzAtb0ZqAWIIUL453YtQ3dI78i0J2W49j/6X+84GCK4HvXB4TT91B RPgMffFmiQmML90JtnMO9JUkHHsyfNrzO1Ji4znV9lxX7jBrTrMYjgUXBKCFgqc0DPpz VwJpsGQBEGlYJIjX7dV8WnqyyzeAGzrAcEnL8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=OvV2Ms41P3lUcOOFW9+GbMninDSa7fZBnVr8GlrwKBJeDR0pLnafZKQIgSWIA4id99 Lny6rwAozhiiPWuQb24CiL0ChsQUg7EFPQXeW5UrXnIrjutlopKlQX6DAzb4qdtOXZlA Re1H4qjVHjAGMzxyqjinK9EiWCAgimQvY2ptc= Received: by 10.204.73.154 with SMTP id q26mr3965609bkj.204.1291933978566; Thu, 09 Dec 2010 14:32:58 -0800 (PST) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id q18sm1221372bka.3.2010.12.09.14.32.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Dec 2010 14:32:58 -0800 (PST) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 2/3] reply: add user-agent field Date: Fri, 10 Dec 2010 00:32:51 +0200 Message-Id: <1291933972-7186-3-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1291933972-7186-1-git-send-email-felipe.contreras@gmail.com> References: <1291933972-7186-1-git-send-email-felipe.contreras@gmail.com> 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: Thu, 09 Dec 2010 22:33:03 -0000 Signed-off-by: Felipe Contreras --- notmuch-reply.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 53a12c5..fc5dac4 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -447,7 +447,7 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_ notmuch_message_t *message; const char *subject, *from_addr = NULL; const char *in_reply_to, *orig_references, *references; - const char *message_id; + const char *message_id, *user_agent; char *simple_from; for (messages = notmuch_query_search_messages (query); @@ -500,6 +500,11 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_ g_mime_object_set_header (GMIME_OBJECT (reply), "References", references); + user_agent = talloc_asprintf (ctx, "notmuch %s", + STRINGIFY(NOTMUCH_VERSION)); + g_mime_object_set_header (GMIME_OBJECT (reply), + "User-Agent", user_agent); + message_id = talloc_asprintf (ctx, "<%lu-notmuch-%s>", time(NULL), simple_from); -- 1.7.3.2