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 79C76431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 09:00:34 -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 6gCDMd07H6lC for <notmuch@notmuchmail.org>;
\r
16 Wed, 18 Apr 2012 09:00:30 -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 B63CF431FAE
\r
19 for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 09:00:29 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 9387568055; Wed, 18 Apr 2012 19:00:26 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: Felipe Contreras <felipe.contreras@gmail.com>,
\r
24 Jani Nikula <jani@nikula.org>
\r
25 Subject: Re: [PATCH v2 1/3] Add 'compose' command
\r
27 <CAMP44s1117VXAOnURjFAeva93oiJsKKPji4awN_SoNFo0QvPPw@mail.gmail.com>
\r
28 References: <1334752753-23970-1-git-send-email-felipe.contreras@gmail.com>
\r
29 <1334752753-23970-2-git-send-email-felipe.contreras@gmail.com>
\r
30 <873981chpj.fsf@nikula.org>
\r
31 <CAMP44s2Ukz=kDaPHYG+jzR3pDfZGP+6Ojqc4Xz5J8PxEd9fKcQ@mail.gmail.com>
\r
32 <87vckxazq7.fsf@nikula.org>
\r
33 <CAMP44s1117VXAOnURjFAeva93oiJsKKPji4awN_SoNFo0QvPPw@mail.gmail.com>
\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: Wed, 18 Apr 2012 19:00:26 +0300
\r
40 Message-ID: <m21unlc9np.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: Wed, 18 Apr 2012 16:00:34 -0000
\r
58 On Wed, Apr 18 2012, Felipe Contreras <felipe.contreras@gmail.com> wrote:
\r
60 > On Wed, Apr 18, 2012 at 5:20 PM, Jani Nikula <jani@nikula.org> wrote:
\r
61 >> On Wed, 18 Apr 2012 16:34:30 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:
\r
62 >>> On Wed, Apr 18, 2012 at 4:06 PM, Jani Nikula <jani@nikula.org> wrote:
\r
64 >>> > Running "notmuch compose" more than once within a second would result in
\r
65 >>> > identical message ids for the messages, which is not a good idea. That's
\r
66 >>> > not likely in interactive use, but the notmuch cli is highly scriptable,
\r
67 >>> > so someone is bound to hit this.
\r
69 >>> > Some paranoid might also be worried about "leaking" the time you run
\r
70 >>> > "notmuch compose"... which may be different from the actual time you
\r
71 >>> > send the message.
\r
73 >>> It's still better than the current situation; nothing. In any case,
\r
74 >>> people that have not needed this would not be affected; their UI would
\r
75 >>> override the Message-ID.
\r
77 >>> So do you have a better suggestion for a Message-ID?
\r
79 >> The easy way would be to just use g_mime_utils_generate_message_id()
\r
80 >> [1]. It doesn't give you any control of the part before @, but I'm not
\r
81 >> sure if that really matters.
\r
83 > This is what gmime does:
\r
84 > g_strdup_printf ("%lu.%lu.%lu@%s", (unsigned long int) time (NULL),
\r
85 > (unsigned long int) getpid (), count++, fqdn);
\r
87 > Which actually has some of the issues you mentioned.
\r
89 > I can do the same if you want (add pid and count). The advantage of
\r
90 > using our own format is that not only would it be more unique, but it
\r
91 > would not have "@fqdn".
\r
93 getpid() is good. I guess count is useless (always one). Now some ideas
\r
94 how to obfuscate time(NULL) (nonce + hash (crc32 good enough?) ?
\r
99 >> Alternatively you can write your own according to e.g. [2]. Glib appears
\r
100 >> to have decent and portable support for pseudo random number
\r
101 >> generation. But why bother? I'd go with gmime.
\r
103 > But gmime doesn't have anything random. I would actually prefer to
\r
104 > have something random though.
\r
111 > _______________________________________________
\r
112 > notmuch mailing list
\r
113 > notmuch@notmuchmail.org
\r
114 > http://notmuchmail.org/mailman/listinfo/notmuch
\r