Re: Partial words on notmuch search?
[notmuch-archives.git] / 96 / 29aec22bc93c1706ce74ad47b67707b848c75d
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 CDB9C429E27\r
6         for <notmuch@notmuchmail.org>; Sat, 12 Nov 2011 23:01:47 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id a74mgQqxpgqm for <notmuch@notmuchmail.org>;\r
17         Sat, 12 Nov 2011 23:01:47 -0800 (PST)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id D1B39431FB6\r
22         for <notmuch@notmuchmail.org>; Sat, 12 Nov 2011 23:01:46 -0800 (PST)\r
23 Received: by bkaq10 with SMTP id q10so5701533bka.26\r
24         for <notmuch@notmuchmail.org>; Sat, 12 Nov 2011 23:01:44 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type;\r
28         bh=ML8sLXkUZZ5UrDjWgkOTeCS2KpkJ2CSnbqHw8KhqcbA=;\r
29         b=jQVKRbhwdVjH4btK9e+WEo94MGfEJGDPiIKb4W7UW5MQDIdNtsWJ9zCzbEr6koftOF\r
30         7SsuE6gUDY5GwFVxGpfNK1g7VnLCpTOtb36j/NWUKOZpH3doP7SHBNz9HjZA5PLOQd10\r
31         KvHyuqoItaKsxSrZUMtvmy0gFu7sBhE2ErdVU=\r
32 Received: by 10.204.155.152 with SMTP id s24mr14330188bkw.5.1321167699670;\r
33         Sat, 12 Nov 2011 23:01:39 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id j9sm23233378bkd.2.2011.11.12.23.01.37\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Sat, 12 Nov 2011 23:01:38 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: Tomi Ollila <tomi.ollila@iki.fi>, Austin Clements <amdragon@MIT.EDU>\r
40 Subject: Re: [PATCH] test: attempt to send QUIT to smtp-dummy in case mail\r
41         send failed\r
42 In-Reply-To: <yf639dthwx1.fsf@taco2.nixu.fi>\r
43 References: <yf6ipmr7dki.fsf@taco2.nixu.fi> <20111112024941.GY2658@mit.edu>\r
44         <yf662iplkv3.fsf@taco2.nixu.fi> <20111112154128.GB2658@mit.edu>\r
45         <yf639dthwx1.fsf@taco2.nixu.fi>\r
46 User-Agent: Notmuch/0.9+55~g81c615b (http://notmuchmail.org) Emacs/23.3.1\r
47         (x86_64-pc-linux-gnu)\r
48 Date: Sun, 13 Nov 2011 11:01:24 +0400\r
49 Message-ID: <8739ds33qz.fsf@gmail.com>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 Cc: notmuch@notmuchmail.org\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Sun, 13 Nov 2011 07:01:48 -0000\r
66 \r
67 On Sat, 12 Nov 2011 23:07:38 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
68 > On Sat, 12 Nov 2011 10:41:28 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
69 > > \r
70 > > Actually, since sending mail is synchronous, there shouldn't be any\r
71 > > issues with buffering or timing.  If Emacs successfully sends the\r
72 > > message, it will wait for the OK response (`smtpmail-via-smtp'), which\r
73 > > should indicate that the message is in stable storage on the SMTP\r
74 > > server (this is rather fundamental to SMTP's reliability as a\r
75 > > protocol, after all).  Thus, the smtp-dummy *should* be done by the\r
76 > > time Emacs exits.  If Emacs fails to send the message, then it doesn't\r
77 > > really matter and you just want the smtp-dummy to go away.\r
78 > > \r
79 > > I say "should" because smtp-dummy needs a one line patch to add an\r
80 > > fflush at the end of receive_data_to_file.  Any real SMTP server would\r
81 > > do this (not to mention a full fsync) before acknowledging the\r
82 > > message.\r
83\r
84 > SO, in our cases there are 2 options:\r
85\r
86\r
87 > 1) add line \r
88 >       { echo QUIT > /dev/tcp/127.0.0.1/25025; } 2>/dev/null\r
89 >   before \r
90 >       wait ${smtp_dummy_pid}\r
91\r
92 > in test-lib.sh\r
93\r
94\r
95 > 2) add line\r
96 >       kill ${smtp_dummy_pid}\r
97 >   before \r
98 >       wait ${smtp_dummy_pid}\r
99\r
100 > in test-lib.sh *and* add that fflush (output) before free (line) in \r
101 > smtp-dummy.c function receive_data_to_file.\r
102\r
103 > folks! opinions!\r
104\r
105 \r
106 I think we should add fflush(3) call to smtp-dummy in any case.\r
107 \r
108 As for sending QUIT over TCP vs kill, I prefer the former.  On one hand,\r
109 kill is more reliable.  But smtp-dummy must handle QUIT and it is a bug\r
110 if it does not.\r
111 \r
112 An unrelated issue: currently we discard test_emacs output in\r
113 emacs_deliver_message and other cases.  Ideally we should not do that\r
114 because it may contain useful information.  We should capture the output\r
115 and print it in case of error, at least.\r
116 \r
117 Regards,\r
118   Dmitry\r
119 \r
120 > Tomi\r
121 > _______________________________________________\r
122 > notmuch mailing list\r
123 > notmuch@notmuchmail.org\r
124 > http://notmuchmail.org/mailman/listinfo/notmuch\r