Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 46 / 7c7215157ebc769abec793a6c5995f95e22139
1 Return-Path: <edward@4angle.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 51C72431FBF\r
6         for <notmuch@notmuchmail.org>; Sat, 22 Nov 2014 01:28:59 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 vaAMix5hXE5Z for <notmuch@notmuchmail.org>;\r
16         Sat, 22 Nov 2014 01:28:54 -0800 (PST)\r
17 Received: from 4angle.com (4angle.com [82.145.46.9])\r
18         (using TLSv1 with cipher AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id C5B82431FBC\r
21         for <notmuch@notmuchmail.org>; Sat, 22 Nov 2014 01:28:54 -0800 (PST)\r
22 Received: from cpc19-cmbg14-2-0-cust212.5-4.cable.virginm.net ([86.6.30.213]\r
23         helo=x230)\r
24         by 4angle.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\r
25         (Exim 4.82) (envelope-from <edward@4angle.com>) id 1Xs6zo-0006Jj-Pg\r
26         for notmuch@notmuchmail.org; Sat, 22 Nov 2014 09:28:48 +0000\r
27 Received: from edward by x230 with local (Exim 4.85_RC1-XX)\r
28         (envelope-from <edward@x230>) id 1Xs6zr-00045a-9v\r
29         for notmuch@notmuchmail.org; Sat, 22 Nov 2014 09:28:51 +0000\r
30 Date: Sat, 22 Nov 2014 09:28:51 +0000\r
31 From: Edward Betts <edward@4angle.com>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: exim pipe transport, notmuch insert and mbox-style messages\r
34 Message-ID: <20141122092851.GA31815@x230>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain; charset=us-ascii\r
37 Content-Disposition: inline\r
38 User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12)\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sat, 22 Nov 2014 09:28:59 -0000\r
52 \r
53 My mail arrives on a Debian machine running exim. It was being filtered\r
54 by procmail then piped into 'notmuch insert'. This was generating the\r
55 single-message mbox warning:\r
56 \r
57 > Warning: ...  is an mbox containing a single message,\r
58 > likely caused by misconfigured mail delivery.  Support for single-message\r
59 > mboxes is deprecated and may be removed in the future.\r
60 \r
61 I thought it was a problem with procmail delivering mbox style messages to\r
62 pipes, so I switched to maildrop. Same problem. This warning is produced\r
63 because there is an mbox-style From_ line before the first header line. Here\r
64 is an example:\r
65 \r
66 > From MAILER-DAEMON Fri Jul  8 12:08:34 2011\r
67 \r
68 The man page for maildrop says this style of message isn't supported, but it\r
69 doesn't detect and warn about them. It will pipe them into commands without\r
70 removing the From_ line.\r
71 \r
72 Reading the exim documentation for pipe transports I found the message_prefix\r
73 option, which is by default is set like this:\r
74 \r
75 > message_prefix = \\r
76 >   From ${if def:return_path{$return_path}{MAILER-DAEMON}}\\r
77 >   ${tod_bsdinbox}\n\r
78 \r
79 This means that exim turns all messages into mbox style messages before\r
80 delivering them to a pipe. The justification given in the documentation is\r
81 "This is required by the commonly used /usr/bin/vacation program."\r
82 \r
83 The fix is to unset the exim message_prefix option for delivery to maildrop.\r
84 Here is an example of the Debian exim maildrop_pipe transport with a blank\r
85 message_prefix to stop the From_ line being added before the message is piped\r
86 to maildrop.\r
87 \r
88 > maildrop_pipe:\r
89 >   debug_print = "T: maildrop_pipe for $local_part@$domain"\r
90 >   driver = pipe\r
91 >   path = "/bin:/usr/bin:/usr/local/bin"\r
92 >   command = "/usr/bin/maildrop"\r
93 >   message_prefix =\r
94 >   message_suffix =\r
95 >   return_path_add\r
96 >   delivery_date_add\r
97 >   envelope_to_add\r
98 \r
99 The same fix could be applied for procmail pipe or a pipe from exim to\r
100 'notmuch insert'.\r
101 \r
102 I submitted a Debian bug for exim4-config with my change as a patch. The\r
103 maintainer has excepted my patch and uploaded a release of exim4-config with\r
104 the fix to Debian experimental. \r
105 \r
106 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769396\r
107 \r
108 I wonder if 'notmuch insert' could be modified to detect and drop the From_\r
109 line before writing the message to disk and index it. It could do that\r
110 silently or with a warning.\r
111 \r
112 -- \r
113 Edward.\r