1 Return-Path: <tomi.ollila@iki.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id E3DC9431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 02:32:07 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 3l4XPBRXHTx4 for <notmuch@notmuchmail.org>;
\r
16 Thu, 19 Apr 2012 02:32:03 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 957FF431FAE
\r
19 for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 02:32:03 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 7CFD668056; Thu, 19 Apr 2012 12:31:58 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: Jani Nikula <jani@nikula.org>,
\r
24 Felipe Contreras <felipe.contreras@gmail.com>
\r
25 Subject: Re: [PATCH v2 1/3] Add 'compose' command
\r
26 In-Reply-To: <8739819ey5.fsf@nikula.org>
\r
27 References: <1334752753-23970-1-git-send-email-felipe.contreras@gmail.com>
\r
28 <1334752753-23970-2-git-send-email-felipe.contreras@gmail.com>
\r
29 <873981chpj.fsf@nikula.org>
\r
30 <CAMP44s2Ukz=kDaPHYG+jzR3pDfZGP+6Ojqc4Xz5J8PxEd9fKcQ@mail.gmail.com>
\r
31 <87vckxazq7.fsf@nikula.org>
\r
32 <CAMP44s1117VXAOnURjFAeva93oiJsKKPji4awN_SoNFo0QvPPw@mail.gmail.com>
\r
33 <8739819ey5.fsf@nikula.org>
\r
34 User-Agent: Notmuch/0.12+113~gde05574 (http://notmuchmail.org) Emacs/23.3.1
\r
35 (x86_64-unknown-linux-gnu)
\r
36 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
37 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
38 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
39 Date: Thu, 19 Apr 2012 12:31:58 +0300
\r
40 Message-ID: <m2aa28oynl.fsf@guru.guru-group.fi>
\r
42 Content-Type: text/plain; charset=us-ascii
\r
43 Cc: Felipe Contreras <felipe.contreras@ngmail.com>, notmuch@notmuchmail.org
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Thu, 19 Apr 2012 09:32:08 -0000
\r
58 On Wed, Apr 18 2012, Jani Nikula <jani@nikula.org> wrote:
\r
60 > On Wed, 18 Apr 2012, Felipe Contreras <felipe.contreras@gmail.com> wrote:
\r
61 >> On Wed, Apr 18, 2012 at 5:20 PM, Jani Nikula <jani@nikula.org> wrote:
\r
62 >>> On Wed, 18 Apr 2012 16:34:30 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:
\r
63 >>>> On Wed, Apr 18, 2012 at 4:06 PM, Jani Nikula <jani@nikula.org> wrote:
\r
65 >>>> > Running "notmuch compose" more than once within a second would result in
\r
66 >>>> > identical message ids for the messages, which is not a good idea. That's
\r
67 >>>> > not likely in interactive use, but the notmuch cli is highly scriptable,
\r
68 >>>> > so someone is bound to hit this.
\r
70 >>>> > Some paranoid might also be worried about "leaking" the time you run
\r
71 >>>> > "notmuch compose"... which may be different from the actual time you
\r
72 >>>> > send the message.
\r
74 >>>> It's still better than the current situation; nothing. In any case,
\r
75 >>>> people that have not needed this would not be affected; their UI would
\r
76 >>>> override the Message-ID.
\r
78 >>>> So do you have a better suggestion for a Message-ID?
\r
80 >>> The easy way would be to just use g_mime_utils_generate_message_id()
\r
81 >>> [1]. It doesn't give you any control of the part before @, but I'm not
\r
82 >>> sure if that really matters.
\r
84 >> This is what gmime does:
\r
85 >> g_strdup_printf ("%lu.%lu.%lu@%s", (unsigned long int) time (NULL),
\r
86 >> (unsigned long int) getpid (), count++, fqdn);
\r
88 >> Which actually has some of the issues you mentioned.
\r
90 > Thanks for looking into gmime source. The implementation is a bit of a
\r
93 >> I can do the same if you want (add pid and count). The advantage of
\r
94 >> using our own format is that not only would it be more unique, but it
\r
95 >> would not have "@fqdn".
\r
97 > I'm starting to think doing our own would be the best, although I
\r
98 > wouldn't object to using the gmime implementation "for now".
\r
100 I think I would be disappointed if I had to use message id:s generated
\r
101 by gmime -- just that "time leakage" problem. I guess the message-id
\r
102 is usually generated just before the mail is sent so the date in message
\r
103 id and Date: header are about equal. If message id is generated one time
\r
104 and Date: another then the time taking to write an email leaks... (except
\r
105 if Date: is also generate at 'notmuch compose' execution time (uhh ;/)
\r
107 Anyway, gmime implementation or something having time(NULL).getpid()
\r
108 could be used "for now".
\r
110 >>> Alternatively you can write your own according to e.g. [2]. Glib appears
\r
111 >>> to have decent and portable support for pseudo random number
\r
112 >>> generation. But why bother? I'd go with gmime.
\r
114 >> But gmime doesn't have anything random. I would actually prefer to
\r
115 >> have something random though.
\r