Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- notmuch-reply.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index d796bb2..22838d5 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -464,7 +464,7 @@ create_reply_message(void *ctx, { 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; /* The 1 means we want headers in a "pretty" order. */ @@ -512,6 +512,7 @@ create_reply_message(void *ctx, g_mime_object_set_header (GMIME_OBJECT (reply), "References", references); + message_id = talloc_asprintf (ctx, "<%lu-notmuch-%s>", time(NULL), simple_from); @@ -519,6 +520,11 @@ create_reply_message(void *ctx, "Message-ID", message_id); talloc_free (simple_from); + user_agent = talloc_asprintf (ctx, "notmuch %s", + STRINGIFY(NOTMUCH_VERSION)); + g_mime_object_set_header (GMIME_OBJECT (reply), + "User-Agent", user_agent); + return reply; } -- 1.7.10