From c73069b4209ba154f8dc7c7da45bacff4263cb56 Mon Sep 17 00:00:00 2001 From: Andrei POPESCU Date: Sat, 22 Nov 2014 18:26:15 +0200 Subject: [PATCH] Re: exim pipe transport, notmuch insert and mbox-style messages --- 7d/ae76a5a7053e6d72f6301ce0233ab6a5951d5d | 145 ++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 7d/ae76a5a7053e6d72f6301ce0233ab6a5951d5d diff --git a/7d/ae76a5a7053e6d72f6301ce0233ab6a5951d5d b/7d/ae76a5a7053e6d72f6301ce0233ab6a5951d5d new file mode 100644 index 000000000..1d2159ecb --- /dev/null +++ b/7d/ae76a5a7053e6d72f6301ce0233ab6a5951d5d @@ -0,0 +1,145 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 17909431FBF + for ; Sat, 22 Nov 2014 08:26:28 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ors-nFQt7+Qx for ; + Sat, 22 Nov 2014 08:26:20 -0800 (PST) +Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com + [74.125.82.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 750CB431FBC for ; Sat, 22 Nov 2014 08:26:20 -0800 + (PST) +Received: by mail-wg0-f53.google.com with SMTP id l18so8880966wgh.40 + for ; Sat, 22 Nov 2014 08:26:19 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:date:to:subject:message-id:references:mime-version + :content-type:content-disposition:in-reply-to:user-agent; + bh=9kG/RK4V+WrlEpJ0XJZRC8t1IAU74gAFowhQwzLe4HM=; + b=rtlN2kcrpLrhXxbSPntr4NWz4ZqEcQeIgKW3XxtHF7oKU5ma2NLOTMqivJCIU1BOxH + HshJ9HhkpeUATKdHjzowNrZ6BlNX2kQup0vNdrOJH12b5E9caX4NVEMJ9hRxbaZvcoXg + lgQY4i+YhOfjdotZSAfJNlF4i+fBY41RJUkQlSnzLJd5unY/gv/KImpC5OqP26xhFqf1 + Wnv0g+UedEP3FpeWIBJTu3u3wjmG4JqjcZ6s8CVU310JpVQ4bodBOqASogFPna8XLU4k + RaxnTbKu1p/1WFum5O/G1nInZw/pMATMnx4BFECKpejCYBFN8e5yIGb6xXLhIoquuSkz + vjMg== +X-Received: by 10.194.110.161 with SMTP id ib1mr19058593wjb.78.1416673579123; + Sat, 22 Nov 2014 08:26:19 -0800 (PST) +Received: from sid.nuvreauspam ([92.86.142.199]) + by mx.google.com with ESMTPSA id n4sm3814543wiz.17.2014.11.22.08.26.17 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 22 Nov 2014 08:26:17 -0800 (PST) +From: Andrei POPESCU +X-Google-Original-From: Andrei POPESCU +Date: Sat, 22 Nov 2014 18:26:15 +0200 +To: notmuch@notmuchmail.org +Subject: Re: exim pipe transport, notmuch insert and mbox-style messages +Message-ID: <20141122162615.GA1209@sid.nuvreauspam> +References: <20141122092851.GA31815@x230> + <87tx1r7enm.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha256; + protocol="application/pgp-signature"; boundary="+0KmLy8UubQqhxHi" +Content-Disposition: inline +In-Reply-To: <87tx1r7enm.fsf@maritornes.cs.unb.ca> +User-Agent: Mutt/1.5.23 (2014-03-12) +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 22 Nov 2014 16:26:28 -0000 + + +--+0KmLy8UubQqhxHi +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable + +On Sb, 22 nov 14, 10:44:45, David Bremner wrote: +> Edward Betts writes: +>=20 +>=20 +> > I wonder if 'notmuch insert' could be modified to detect and drop the F= +rom_ +> > line before writing the message to disk and index it. It could do that +> > silently or with a warning. +>=20 +> I don't know about the larger question(s), but I'd suggest just escaping +> it to something like X-Envelope-From: . There may even be some +> semi-standard header to use for this. + +I had the same problem with postfix + maildrop, as local(8)=20 +unconditionally adds the 'From ' header when delivering to an external=20 +command and upstream did not consider my suggestion to make this=20 +configurable. The work-arounds I came up with: + +1. use 'reformail -f0' as suggested in maildrop(1) + +reformail(1): + + -f0 + Any initial blank lines are removed. If the first non-blank line is a= +=20 + "From_" line, it gets converted to a "Return-Path:" header, and any + existing "Return-Path:" header gets removed. If the message does not=20 + start with a "From_" line, the message remains unchanged. + +2. adjust the 'maildrop' destination in postfix' master.cf to remove the=20 +'F' flag. + +pipe(8): + + F Prepend a "From sender time_stamp" envelope header to the=20 + message content. This is expected by, for example, UUCP + software. + +3. Deliver from postfix to a Maildir, bypassing any filtering. + +Kind regards, +Andrei +--=20 +If you can't explain it simply, you don't understand it well enough. +(Albert Einstein) +http://nuvreauspam.ro/gpg-transition.txt + +--+0KmLy8UubQqhxHi +Content-Type: application/pgp-signature; name="signature.asc" +Content-Description: Digital signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAEBCAAGBQJUcLknAAoJEP/HhUTvIjQcFFQP/2FFUe6QFHxY60MssOhvw0xc +ddpGRKpYMMdS59aEr7FXAB/ztfMczuD3tBpytoPYdk9qrKX1HUs3PqcNL7dU1iNA +M1GjVCHvwZbfABma/R2DFug6HKVSWP2b+iOl04/Ib4+LJGB3I3IMQqPetfO+IQAh +f941MAXwEIm/Io+rNS8kCQzk/WO1rSB00McP+1b4e3PKzwj2h04Dib6Z6AzgZOmY +AQhKdeAFVr4Y0Vf1L3nFtD4QTf3+rUdJ7xJqfwRWF8Eh18fg6kRCcK8AWk3+/Sm6 +7WbZoU0IvMRcChQZS9367nwWdB4U9O1eYbEd4LFKqllM30GMqjrbwrvZG+JAXxDZ +SJ0EXZu9p4OJYvBNxaBzbtbJoJtYX/pP8EWgvSchVf8/w3avoVLk4iLAzsnGb8g7 +U9780FHzO0T3/1qF1zrD0aPryFlqvt6idxKteTsqIbiDUdNzgVHjYI4Pu5iq3WeZ +jcxHxNVBudtzfIIxRocuThWY60/qcTBg7rQdyyDr3r8kls0kSNfxJoPjd7OE64EE +ujihCcCGsOTOgFh503HiTzrH1Dz2E9lZM6QfaU37ONIbPkUzuOAiEYbNTtBJBDTP +84ipUrjLuZfxzb9nWL1H72vOACHKCXTEd9U8FsyPQ3cYrqZbIzU8p6vNdpHPEVo0 +K8fNvNU1T1hC8SGCRgM4 +=5Bvd +-----END PGP SIGNATURE----- + +--+0KmLy8UubQqhxHi-- -- 2.26.2