--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 0EA2F431FB6\r
+ for <notmuch@notmuchmail.org>; Wed, 3 Sep 2014 01:32:34 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.502\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.502 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id hbNKHn2wV1pf for <notmuch@notmuchmail.org>;\r
+ Wed, 3 Sep 2014 01:32:26 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id CA4EF431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 3 Sep 2014 01:32:25 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1XP5yv-0000J0-L9; Wed, 03 Sep 2014 09:32:17 +0100\r
+Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1XP5yv-0004bu-9c; Wed, 03 Sep 2014 09:31:57 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: David Belohrad <david@belohrad.ch>, Keith Amidon <camalot@picnicpark.org>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: sending email using different server for different 'From:' field\r
+In-Reply-To: <uaxbnqxdvh8.fsf@beesknees.cern.ch>\r
+References: <uaxzjei1a4j.fsf@beesknees.cern.ch>\r
+ <1409668511.2507.32.camel@picnicpark.org>\r
+ <uaxbnqxdvh8.fsf@beesknees.cern.ch>\r
+User-Agent: Notmuch/0.15.2+803~ge083086 (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Wed, 03 Sep 2014 09:31:55 +0100\r
+Message-ID: <87egvtds04.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 87.81.223.162\r
+X-QM-Geographic: According to ripencc,\r
+ this message was delivered by a machine in Britain (UK) (GB).\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: 73216c59c36b5ced87234fe02178ff3d (of first 20000 bytes)\r
+X-SpamAssassin-Score: -0.1\r
+X-SpamAssassin-SpamBar: /\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored -0.1 points.\r
+ Summary of the scoring: \r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * -0.1 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 03 Sep 2014 08:32:34 -0000\r
+\r
+\r
+Hi\r
+\r
+On Wed, 03 Sep 2014, David Belohrad <david@belohrad.ch> wrote:\r
+> oukej. this seems to be exactly what I'm looking for. Is there a way how\r
+> to 'cycle' in notmuch different From: fields? I'd need to setup like 3\r
+> addresses, each of them with different signatures and be able to easily\r
+> switch between them....\r
+\r
+You might finding setting notmuch-always-prompt-for-sender to 't is\r
+what you want (you can set if in customise or directly)\r
+\r
+This prompts you for the sender address and takes options from your\r
+notmuch config file (that is from user.primary_email and\r
+user.other_email from .notmuch-config) so will quite possibly just work.\r
+\r
+\r
+>>\r
+>> (defun kea/message-select-mail-dest ()\r
+>> (cond ((string-match "<kea@x.com>"\r
+>> (message-field-value "From"))\r
+>> (kea/send-mail-with-x))\r
+>> (t\r
+>> (kea/send-mail-with-y))))\r
+>>\r
+>> (kea/send-mail-with-y)\r
+>> (add-hook 'message-send-hook 'kea/message-select-mail-dest)\r
+\r
+I will also mention an alternative approach to using hooks here. You\r
+could customise message-send-mail-function to be your own function which\r
+let binds the appropriate send-mail settings and have that call the\r
+actual send-mail function (eg message-send-mail-with-sendmail)\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r