From e628a6da5e8e5921483eadc37cbd4d8a82d17489 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sun, 19 Jul 2015 09:22:14 +0100 Subject: [PATCH] Re: Modify message after send...? --- 93/bec3fdecc63a015f9414055486a37c6489614d | 92 +++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 93/bec3fdecc63a015f9414055486a37c6489614d diff --git a/93/bec3fdecc63a015f9414055486a37c6489614d b/93/bec3fdecc63a015f9414055486a37c6489614d new file mode 100644 index 000000000..fad8fbffc --- /dev/null +++ b/93/bec3fdecc63a015f9414055486a37c6489614d @@ -0,0 +1,92 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 835AB6DE1781 + for ; Sun, 19 Jul 2015 01:22:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.017 +X-Spam-Level: +X-Spam-Status: No, score=0.017 tagged_above=-999 required=5 tests=[AWL=0.587, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id jZ9XCNYntxX9 for ; + Sun, 19 Jul 2015 01:22:19 -0700 (PDT) +Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com + [209.85.212.178]) + by arlo.cworth.org (Postfix) with ESMTPS id 860466DE177D + for ; Sun, 19 Jul 2015 01:22:19 -0700 (PDT) +Received: by wibxm9 with SMTP id xm9so1869922wib.1 + for ; Sun, 19 Jul 2015 01:22:16 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=lHIxpYIC6+laUHJFfu49L/XDtkR13oz9AtVhgv83BCU=; + b=p2RMOXuOkQhY9X71qJuCFwfccuiaNrI+6/vQ3jTPIiP6QeLebERUqia+ILzhYw7voe + cQmiEHfhC1p3ilHzUrjhMx0kyprV9+D3KgiRfJZQPHR0AZTjhpSvTpnxYJwELWxNgUw+ + cN14Z2x9/RKbGBk6b1t3rb0GSm7rf2OQMPnYljBkzFA9ipcpE55qR1dIhP7qdEUsxuPz + iWaUlB0enL15MjnV7wdRnvpCKAVHMP8wdgRi+3R65LxYtsisxLgbV5OmT/D0tA6aarWy + hbsg7lO9RYoCZhdxNO927L9MTHi5BV50QQZVYZ0eA/vrX4qEiIARiQBI8z2PZ/1EuCiC + k/3Q== +X-Received: by 10.180.21.244 with SMTP id y20mr10837977wie.65.1437294136282; + Sun, 19 Jul 2015 01:22:16 -0700 (PDT) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by smtp.gmail.com with ESMTPSA id fa8sm6039319wib.14.2015.07.19.01.22.15 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sun, 19 Jul 2015 01:22:15 -0700 (PDT) +From: Mark Walters +To: David Bremner , mailinglists@nawaz.org, + notmuch@notmuchmail.org +Subject: Re: Modify message after send...? +In-Reply-To: <87a8uswpan.fsf@maritornes.cs.unb.ca> +References: <878uacpwse.fsf@fester.com> <87a8uswpan.fsf@maritornes.cs.unb.ca> +User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Sun, 19 Jul 2015 09:22:14 +0100 +Message-ID: <87fv4kzhe1.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Sun, 19 Jul 2015 08:22:21 -0000 + + +>> BTW, all I really want to do is modify the From: field based on the +>> recipients (for every email, with no default From). I'll welcome +>> suggestions for existing ways to do that. I Googled a little, but didn't +>> find a clear good solution. Furthermore, I expect over time the rules by +>> which I pick the From: field will get more complex than my knowledge of +>> Elisp. + +I don't know how practical the following is but an alternative which +would keep you entirely outside lisp would be to configure +sendmail-program to be your python script and let it modify the message +and then send it on to whatever sendmail program you use. + +Getting everything right with command line arguments and the message on +stdin (I guess) and keeping any sane form of error handling may be difficult + +Also, note that sendmail-program is not notmuch specific so if you +configure it might affect other emacs mail stuff like gnus. + +Best wishes + +Mark + + + -- 2.26.2