From 7b85d917e0747bc336bcc734d72b3569fecec707 Mon Sep 17 00:00:00 2001 From: mailinglists Date: Sun, 19 Jul 2015 21:59:45 +1700 Subject: [PATCH] Modify message after send...? --- 0e/86a85c850c299d3d66ddc84477448c8f558dbc | 99 +++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 0e/86a85c850c299d3d66ddc84477448c8f558dbc diff --git a/0e/86a85c850c299d3d66ddc84477448c8f558dbc b/0e/86a85c850c299d3d66ddc84477448c8f558dbc new file mode 100644 index 000000000..43c79c424 --- /dev/null +++ b/0e/86a85c850c299d3d66ddc84477448c8f558dbc @@ -0,0 +1,99 @@ +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 A35746DE172B + for ; Sat, 18 Jul 2015 22:06:45 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.701 +X-Spam-Level: +X-Spam-Status: No, score=-0.701 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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 i--2aH2ZhcBv for ; + Sat, 18 Jul 2015 22:06:43 -0700 (PDT) +X-Greylist: delayed 403 seconds by postgrey-1.35 at arlo; + Sat, 18 Jul 2015 22:06:43 PDT +Received: from filter02.dlls.pa.frontiernet.net + (filter02.dlls.pa.frontiernet.net [199.224.80.229]) + by arlo.cworth.org (Postfix) with ESMTP id 991836DE13D2 + for ; Sat, 18 Jul 2015 22:06:43 -0700 (PDT) +Received: from localhost (localhost [127.0.0.1]) + by filter02.dlls.pa.frontiernet.net (Postfix) with ESMTP id 4DAD042C0FF + for ; Sun, 19 Jul 2015 04:59:58 +0000 (UTC) +Received: from relay04.dlls.pa.frontiernet.net ([199.224.80.247]) by localhost + (filter02.dlls.pa.frontiernet.net [199.224.80.229]) (amavisd-new, port 10024) + with LMTP id ArOfKhtECiyl for ; Sun, 19 Jul 2015 + 04:59:46 +0000 (UTC) +X-Originating-IP: [50.43.37.138] +X-Previous-IP: 50.43.37.138 +Received: from beetle_b (static-50-43-37-138.bvtn.or.frontiernet.net + [50.43.37.138]) + by relay04.dlls.pa.frontiernet.net (Postfix) with ESMTPA id A16E52F8098 + for ; Sun, 19 Jul 2015 04:59:46 +0000 (UTC) +Received: by beetle_b (Postfix, from userid 1000) + id 76A508BC90; Sat, 18 Jul 2015 21:59:45 -0700 (PDT) +From: mailinglists@nawaz.org +To: notmuch@notmuchmail.org +Subject: Modify message after send...? +User-Agent: Notmuch/0.19 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +nm-tags: +Date: Sat, 18 Jul 2015 21:59:45 -0700 +Message-ID: <878uacpwse.fsf@fester.com> +MIME-Version: 1.0 +Content-Type: text/plain +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 05:06:45 -0000 + +Hi, + +I use notmuch via Emacs. + +Here's what I want: + +When I hit C-c C-c to send a message, I'd like it to be passed to a +script (likely a Python one, although I may consider an Elisp function +if an external script is not possible) for modification of headers, +before it is sent to the MTA (Postfix in my case). A bonus would be to +have the modified message stored in the FCC location, instead of the +original one. + +Is this possible? An alternative may be to modify the message /before/ +it goes to message-send-and-exit. I'm inexperienced in Elisp - would +this be via what's called "advising"? + +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. + +Thanks. + +-- +My sister opened a computer store in Hawaii. She sells C shells down by +the seashore. + + + /\ /\ /\ / + / \/ \ u e e n / \/ a w a z + >>>>>>mueen@nawaz.org<<<<<< + anl + + -- 2.26.2