Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 6b / b963079c8a20e12e0b71732e949dd6fde9ae30
1 Return-Path: <jani@nikula.org>\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 DBB44431FB6\r
6         for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 09:34:37 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 UDnd5c0jKyVl for <notmuch@notmuchmail.org>;\r
16         Wed, 18 Apr 2012 09:34:34 -0700 (PDT)\r
17 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
18         [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id A27C9431FAE\r
21         for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 09:34:33 -0700 (PDT)\r
22 Received: by lbdb5 with SMTP id b5so2993419lbd.26\r
23         for <notmuch@notmuchmail.org>; Wed, 18 Apr 2012 09:34:32 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:cc:subject:in-reply-to:references:date:message-id\r
27         :mime-version:content-type:x-gm-message-state;\r
28         bh=9Iay26iF4wL+ZkMR1Kk1up88VTXGOQagLF3fZyCLUqc=;\r
29         b=QNDDgZ0AVQ3qAYwWICb7CP9lN+C1ZjEPHnf5247H+KTbpLK9ZtQ6wNAvBbgysDmD5T\r
30         XHdMAF3z0lAUoX8UZHOArsv86L9QjQpM1Eh3DYSvJL9OJZCo5B1BuOFiaGqU1qM+c2LT\r
31         vGq8kzMOEp9VP9A17b8RVCj/ankTb8vMaG4yGVL0s87ynvNeICPVmdwmOprA/hvUfNIh\r
32         MWFrB7vQ9xJVJFIuPXYtMl7HiZ6TnkwxhVyO5HdBbXGSCE9Pn9sFRkoTF8RCUb97GMle\r
33         YM/XcWUjcOqWmw9urXhE1gADXmK7OBzlJxRXYi4AnA9OTlkySN56i/Au06XSSYSPuUzP\r
34         2Y7g==\r
35 Received: by 10.112.45.98 with SMTP id l2mr1324337lbm.63.1334766871962;\r
36         Wed, 18 Apr 2012 09:34:31 -0700 (PDT)\r
37 Received: from localhost (dsl-hkibrasgw4-fe50dc00-68.dhcp.inet.fi.\r
38         [80.220.80.68])\r
39         by mx.google.com with ESMTPS id o2sm8054912lbd.7.2012.04.18.09.34.28\r
40         (version=SSLv3 cipher=OTHER); Wed, 18 Apr 2012 09:34:30 -0700 (PDT)\r
41 From: Jani Nikula <jani@nikula.org>\r
42 To: Felipe Contreras <felipe.contreras@gmail.com>\r
43 Subject: Re: [PATCH v2 1/3] Add 'compose' command\r
44 In-Reply-To:\r
45  <CAMP44s1117VXAOnURjFAeva93oiJsKKPji4awN_SoNFo0QvPPw@mail.gmail.com>\r
46 References: <1334752753-23970-1-git-send-email-felipe.contreras@gmail.com>\r
47         <1334752753-23970-2-git-send-email-felipe.contreras@gmail.com>\r
48         <873981chpj.fsf@nikula.org>\r
49         <CAMP44s2Ukz=kDaPHYG+jzR3pDfZGP+6Ojqc4Xz5J8PxEd9fKcQ@mail.gmail.com>\r
50         <87vckxazq7.fsf@nikula.org>\r
51         <CAMP44s1117VXAOnURjFAeva93oiJsKKPji4awN_SoNFo0QvPPw@mail.gmail.com>User-Agent: Notmuch/0.12+81~g839a805 (http://notmuchmail.org) Emacs/23.3.1\r
52         (i686-pc-linux-gnu)\r
53 Date: Wed, 18 Apr 2012 19:34:26 +0300\r
54 Message-ID: <8739819ey5.fsf@nikula.org>\r
55 MIME-Version: 1.0\r
56 Content-Type: text/plain; charset=us-ascii\r
57 X-Gm-Message-State:\r
58  ALoCoQk1jOR48RtqX7gbVwldsA8/UPwho5wIK8OczLItcuJjUwmJkhHNXxlGjVKD3tyKKIUHoffL\r
59 Cc: Felipe Contreras <felipe.contreras@ngmail.com>, notmuch@notmuchmail.org\r
60 X-BeenThere: notmuch@notmuchmail.org\r
61 X-Mailman-Version: 2.1.13\r
62 Precedence: list\r
63 List-Id: "Use and development of the notmuch mail system."\r
64         <notmuch.notmuchmail.org>\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
68 List-Post: <mailto:notmuch@notmuchmail.org>\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
72 X-List-Received-Date: Wed, 18 Apr 2012 16:34:38 -0000\r
73 \r
74 On Wed, 18 Apr 2012, Felipe Contreras <felipe.contreras@gmail.com> wrote:\r
75 > On Wed, Apr 18, 2012 at 5:20 PM, Jani Nikula <jani@nikula.org> wrote:\r
76 >> On Wed, 18 Apr 2012 16:34:30 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:\r
77 >>> On Wed, Apr 18, 2012 at 4:06 PM, Jani Nikula <jani@nikula.org> wrote:\r
78 >>>\r
79 >>> > Running "notmuch compose" more than once within a second would result in\r
80 >>> > identical message ids for the messages, which is not a good idea. That's\r
81 >>> > not likely in interactive use, but the notmuch cli is highly scriptable,\r
82 >>> > so someone is bound to hit this.\r
83 >>> >\r
84 >>> > Some paranoid might also be worried about "leaking" the time you run\r
85 >>> > "notmuch compose"... which may be different from the actual time you\r
86 >>> > send the message.\r
87 >>>\r
88 >>> It's still better than the current situation; nothing. In any case,\r
89 >>> people that have not needed this would not be affected; their UI would\r
90 >>> override the Message-ID.\r
91 >>>\r
92 >>> So do you have a better suggestion for a Message-ID?\r
93 >>\r
94 >> The easy way would be to just use g_mime_utils_generate_message_id()\r
95 >> [1]. It doesn't give you any control of the part before @, but I'm not\r
96 >> sure if that really matters.\r
97 >\r
98 > This is what gmime does:\r
99 > g_strdup_printf ("%lu.%lu.%lu@%s", (unsigned long int) time (NULL),\r
100 > (unsigned long int) getpid (), count++, fqdn);\r
101 >\r
102 > Which actually has some of the issues you mentioned.\r
103 \r
104 Thanks for looking into gmime source. The implementation is a bit of a\r
105 disappointment.\r
106 \r
107 > I can do the same if you want (add pid and count). The advantage of\r
108 > using our own format is that not only would it be more unique, but it\r
109 > would not have "@fqdn".\r
110 \r
111 I'm starting to think doing our own would be the best, although I\r
112 wouldn't object to using the gmime implementation "for now".\r
113 \r
114 >> Alternatively you can write your own according to e.g. [2]. Glib appears\r
115 >> to have decent and portable support for pseudo random number\r
116 >> generation. But why bother? I'd go with gmime.\r
117 >\r
118 > But gmime doesn't have anything random. I would actually prefer to\r
119 > have something random though.\r
120 \r
121 Agreed.\r
122 \r
123 \r
124 BR,\r
125 Jani.\r