Re: [PATCH v2 1/3] Add 'compose' command
authorFelipe Contreras <felipe.contreras@gmail.com>
Thu, 19 Apr 2012 14:03:50 +0000 (17:03 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:35 +0000 (09:46 -0800)
63/04c05a1a9a973ecb9c0b7f714ecc4548700f4d [new file with mode: 0644]

diff --git a/63/04c05a1a9a973ecb9c0b7f714ecc4548700f4d b/63/04c05a1a9a973ecb9c0b7f714ecc4548700f4d
new file mode 100644 (file)
index 0000000..000fa7a
--- /dev/null
@@ -0,0 +1,130 @@
+Return-Path: <felipe.contreras@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 33BE6431FBC\r
+       for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 07:03:58 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id scTrhzJSt--z for <notmuch@notmuchmail.org>;\r
+       Thu, 19 Apr 2012 07:03:53 -0700 (PDT)\r
+Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com\r
+ [74.125.83.53])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 9FFE3431FB6   for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 07:03:53 -0700\r
+ (PDT)\r
+Received: by eekb47 with SMTP id b47so3529419eek.26\r
+       for <notmuch@notmuchmail.org>; Thu, 19 Apr 2012 07:03:51 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=mime-version:in-reply-to:references:date:message-id:subject:from:to\r
+       :cc:content-type;\r
+       bh=7QEjX/UaKYAndCGLL+edeVQlxZQ1WfcakxWpDz9Qw0I=;\r
+       b=zA4FTBKRi+PGShsMowN/+gGkXLXaGAmC8+wkMEwXc+ScIFGOr5rt6j6gNDZxzY7ifW\r
+       qVBiR7o4v2wIdWzkeigUJvWMMNufUPzeRl7t1TwyNr2NBuKxYujTDOKFGWO4U9RD0IET\r
+       h2QPi4vleX5ss0Btn0WAX1YOGch0Cp6bfcFICevAHbBMaOxaqV/WPtyyVbqEfAyNsln5\r
+       9efVCk3GKy+vQDK4CQiXP8nPmy77GTGUeeMD5x5Nv1IoxhgxbsUIcnn5eeG9Ldq0TaqC\r
+       ME13tFFxd1vLPqmxspyK1i4ufrr00M9F7ExHRzhvZJaCl+RTxqgHVdOgTt6leVsjz2xK\r
+       WW4g==\r
+MIME-Version: 1.0\r
+Received: by 10.14.39.197 with SMTP id d45mr352032eeb.89.1334844230910; Thu,\r
+       19 Apr 2012 07:03:50 -0700 (PDT)\r
+Received: by 10.213.19.67 with HTTP; Thu, 19 Apr 2012 07:03:50 -0700 (PDT)\r
+In-Reply-To: <m2aa28oynl.fsf@guru.guru-group.fi>\r
+References: <1334752753-23970-1-git-send-email-felipe.contreras@gmail.com>\r
+       <1334752753-23970-2-git-send-email-felipe.contreras@gmail.com>\r
+       <873981chpj.fsf@nikula.org>\r
+       <CAMP44s2Ukz=kDaPHYG+jzR3pDfZGP+6Ojqc4Xz5J8PxEd9fKcQ@mail.gmail.com>\r
+       <87vckxazq7.fsf@nikula.org>\r
+       <CAMP44s1117VXAOnURjFAeva93oiJsKKPji4awN_SoNFo0QvPPw@mail.gmail.com>\r
+       <8739819ey5.fsf@nikula.org> <m2aa28oynl.fsf@guru.guru-group.fi>\r
+Date: Thu, 19 Apr 2012 17:03:50 +0300\r
+Message-ID:\r
+ <CAMP44s2K6C9evr3tJaZ7KXJrRNU4mCXSu0o+GjHKEshtCZBNPQ@mail.gmail.com>\r
+Subject: Re: [PATCH v2 1/3] Add 'compose' command\r
+From: Felipe Contreras <felipe.contreras@gmail.com>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>\r
+Content-Type: text/plain; charset=UTF-8\r
+Cc: Felipe Contreras <felipe.contreras@ngmail.com>, notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 19 Apr 2012 14:03:58 -0000\r
+\r
+On Thu, Apr 19, 2012 at 12:31 PM, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> On Wed, Apr 18 2012, Jani Nikula <jani@nikula.org> wrote:\r
+>\r
+>> On Wed, 18 Apr 2012, Felipe Contreras <felipe.contreras@gmail.com> wrote:\r
+>>> On Wed, Apr 18, 2012 at 5:20 PM, Jani Nikula <jani@nikula.org> wrote:\r
+>>>> On Wed, 18 Apr 2012 16:34:30 +0300, Felipe Contreras <felipe.contreras@gmail.com> wrote:\r
+>>>>> On Wed, Apr 18, 2012 at 4:06 PM, Jani Nikula <jani@nikula.org> wrote:\r
+>>>>>\r
+>>>>> > Running "notmuch compose" more than once within a second would result in\r
+>>>>> > identical message ids for the messages, which is not a good idea. That's\r
+>>>>> > not likely in interactive use, but the notmuch cli is highly scriptable,\r
+>>>>> > so someone is bound to hit this.\r
+>>>>> >\r
+>>>>> > Some paranoid might also be worried about "leaking" the time you run\r
+>>>>> > "notmuch compose"... which may be different from the actual time you\r
+>>>>> > send the message.\r
+>>>>>\r
+>>>>> It's still better than the current situation; nothing. In any case,\r
+>>>>> people that have not needed this would not be affected; their UI would\r
+>>>>> override the Message-ID.\r
+>>>>>\r
+>>>>> So do you have a better suggestion for a Message-ID?\r
+>>>>\r
+>>>> The easy way would be to just use g_mime_utils_generate_message_id()\r
+>>>> [1]. It doesn't give you any control of the part before @, but I'm not\r
+>>>> sure if that really matters.\r
+>>>\r
+>>> This is what gmime does:\r
+>>> g_strdup_printf ("%lu.%lu.%lu@%s", (unsigned long int) time (NULL),\r
+>>> (unsigned long int) getpid (), count++, fqdn);\r
+>>>\r
+>>> Which actually has some of the issues you mentioned.\r
+>>\r
+>> Thanks for looking into gmime source. The implementation is a bit of a\r
+>> disappointment.\r
+>>\r
+>>> I can do the same if you want (add pid and count). The advantage of\r
+>>> using our own format is that not only would it be more unique, but it\r
+>>> would not have "@fqdn".\r
+>>\r
+>> I'm starting to think doing our own would be the best, although I\r
+>> wouldn't object to using the gmime implementation "for now".\r
+>\r
+> I think I would be disappointed if I had to use message id:s generated\r
+> by gmime -- just that "time leakage" problem. I guess the message-id\r
+> is usually generated just before the mail is sent so the date in message\r
+> id and Date: header are about equal. If message id is generated one time\r
+> and Date: another then the time taking to write an email leaks... (except\r
+> if Date: is also generate at 'notmuch compose' execution time (uhh ;/)\r
+>\r
+> Anyway, gmime implementation or something having time(NULL).getpid()\r
+> could be used "for now".\r
+\r
+I agree. I was going to send a first batch of patches using gmime's\r
+implementation for now, but since apparently I have to add a bunch of\r
+features to my notmuch-compose patch, I'm most likely going to wait\r
+since I'm having trouble getting even a working setup right now.\r
+\r
+Cheers.\r
+\r
+-- \r
+Felipe Contreras\r