From 78d6519c1bd57ed95c647ed46cb380c5cac1d2c0 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 18 Apr 2012 14:20:16 +0000 Subject: [PATCH] Re: [PATCH v2 1/3] Add 'compose' command --- 41/88a24459198b3788a3e693521a3a67757ad921 | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 41/88a24459198b3788a3e693521a3a67757ad921 diff --git a/41/88a24459198b3788a3e693521a3a67757ad921 b/41/88a24459198b3788a3e693521a3a67757ad921 new file mode 100644 index 000000000..e23b3a333 --- /dev/null +++ b/41/88a24459198b3788a3e693521a3a67757ad921 @@ -0,0 +1,103 @@ +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 DF66A431FBC + for ; Wed, 18 Apr 2012 07:20:30 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 bejQzl-r9QJB for ; + Wed, 18 Apr 2012 07:20:21 -0700 (PDT) +Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com + [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id D465E431FAE + for ; Wed, 18 Apr 2012 07:20:20 -0700 (PDT) +Received: by qcsk26 with SMTP id k26so5645397qcs.26 + for ; Wed, 18 Apr 2012 07:20:20 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type:x-gm-message-state; + bh=xj4ZY5F3J+wVVh7i9jxlYcIgnkKo2IrVm67/ZaCRdpU=; + b=Uukk6fO6U63cHoU3tQ5M1iNsWCY/DKPmj6dDVFnixDiKu/LtbeIUNi5leXQMYT5GTM + AOokorXPD9KKMXFuSemcUrzQ+8dJ1DBvmCocLGEu62gSdQEZFEMYsmFQuez/iRbSbBrW + T1giBHtN0lnjJgFaKQQ1OARyC5NFp5oolEMfyqeWhtaJHJGFHmVI2lQST4/do1j3xt3x + MnWL8vTDwXJkbPwZ0lRZMT+DW5gK9cH00EEtIfkPPPREo7uaXGwqRt8gYkmCpeTN2XDR + xVUb/3dYJ5XCgwYBhCxUPQd/85oB4KBOVDoR4pfnP8pGbOwnWPQmlv+AsFQRpcj2Assv + XAsQ== +Received: by 10.224.187.2 with SMTP id cu2mr3647011qab.88.1334758820257; + Wed, 18 Apr 2012 07:20:20 -0700 (PDT) +Received: from localhost (nikula.org. [92.243.24.172]) + by mx.google.com with ESMTPS id i8sm46335592qah.4.2012.04.18.07.20.18 + (version=SSLv3 cipher=OTHER); Wed, 18 Apr 2012 07:20:18 -0700 (PDT) +From: Jani Nikula +To: Felipe Contreras +Subject: Re: [PATCH v2 1/3] Add 'compose' command +In-Reply-To: + +References: <1334752753-23970-1-git-send-email-felipe.contreras@gmail.com> + <1334752753-23970-2-git-send-email-felipe.contreras@gmail.com> + <873981chpj.fsf@nikula.org> + +User-Agent: Notmuch/0.11.1+222~ga47a98c (http://notmuchmail.org) Emacs/23.1.1 + (i686-pc-linux-gnu) +Date: Wed, 18 Apr 2012 14:20:16 +0000 +Message-ID: <87vckxazq7.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQnLn4LVmWAfprdfWbnRaaeKW0ptl8MDoMddoOK8L6YqSDUQQvXtuNbBjzAfirQa7z8jDVDy +Cc: Felipe Contreras , notmuch@notmuchmail.org +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, 18 Apr 2012 14:20:31 -0000 + +On Wed, 18 Apr 2012 16:34:30 +0300, Felipe Contreras wrote: +> On Wed, Apr 18, 2012 at 4:06 PM, Jani Nikula wrote: +> +> > Running "notmuch compose" more than once within a second would result in +> > identical message ids for the messages, which is not a good idea. That's +> > not likely in interactive use, but the notmuch cli is highly scriptable, +> > so someone is bound to hit this. +> > +> > Some paranoid might also be worried about "leaking" the time you run +> > "notmuch compose"... which may be different from the actual time you +> > send the message. +> +> It's still better than the current situation; nothing. In any case, +> people that have not needed this would not be affected; their UI would +> override the Message-ID. +> +> So do you have a better suggestion for a Message-ID? + +The easy way would be to just use g_mime_utils_generate_message_id() +[1]. It doesn't give you any control of the part before @, but I'm not +sure if that really matters. + +Alternatively you can write your own according to e.g. [2]. Glib appears +to have decent and portable support for pseudo random number +generation. But why bother? I'd go with gmime. + +BR, +Jani. + + +[1] http://developer.gnome.org/gmime/stable/gmime-gmime-utils.html#g-mime-utils-generate-message-id +[2] http://www.jwz.org/doc/mid.html -- 2.26.2