From: David Belohrad Date: Fri, 5 Sep 2014 21:47:46 +0000 (+0200) Subject: Re: sending email using different server for different 'From:' field X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=80ca9d594b951ac62da8f3c664cfa79153c19d26;p=notmuch-archives.git Re: sending email using different server for different 'From:' field --- diff --git a/2b/ef27b7914738e8321ab8aa6c6da5082e21ff17 b/2b/ef27b7914738e8321ab8aa6c6da5082e21ff17 new file mode 100644 index 000000000..b2949a838 --- /dev/null +++ b/2b/ef27b7914738e8321ab8aa6c6da5082e21ff17 @@ -0,0 +1,98 @@ +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 2B107431FB6 + for ; Fri, 5 Sep 2014 14:48:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 aRJsMtDmE4Fg for ; + Fri, 5 Sep 2014 14:47:57 -0700 (PDT) +Received: from pcbe13433.cern.ch (static-212-101-19-163.adsl.solnet.ch + [212.101.19.163]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2AF07431FAF + for ; Fri, 5 Sep 2014 14:47:57 -0700 (PDT) +Received: from belohrad by pcbe13433.cern.ch with local (Exim 4.84_RC2) + (envelope-from ) + id 1XQ1MA-0006dY-Qe; Fri, 05 Sep 2014 23:47:46 +0200 +From: David Belohrad +To: Mark Walters , + Keith Amidon , notmuch@notmuchmail.org +Subject: Re: sending email using different server for different 'From:' field +In-Reply-To: <87egvtds04.fsf@qmul.ac.uk> +References: + <1409668511.2507.32.camel@picnicpark.org> + <87egvtds04.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.18~rc0+1~g40dc79d (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 05 Sep 2014 23:47:46 +0200 +Message-ID: <87ppf9yc1p.fsf@pcbe13433.cern.ch> +MIME-Version: 1.0 +Content-Type: text/plain +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: Fri, 05 Sep 2014 21:48:01 -0000 + +Dear Both, +thanks alot, i'll try to see those options (when i find a bit of +time :) + +nice evening (in europe at least) + +.d. + + +Mark Walters writes: + +> Hi +> +> On Wed, 03 Sep 2014, David Belohrad wrote: +>> oukej. this seems to be exactly what I'm looking for. Is there a way how +>> to 'cycle' in notmuch different From: fields? I'd need to setup like 3 +>> addresses, each of them with different signatures and be able to easily +>> switch between them.... +> +> You might finding setting notmuch-always-prompt-for-sender to 't is +> what you want (you can set if in customise or directly) +> +> This prompts you for the sender address and takes options from your +> notmuch config file (that is from user.primary_email and +> user.other_email from .notmuch-config) so will quite possibly just work. +> +> +>>> +>>> (defun kea/message-select-mail-dest () +>>> (cond ((string-match "" +>>> (message-field-value "From")) +>>> (kea/send-mail-with-x)) +>>> (t +>>> (kea/send-mail-with-y)))) +>>> +>>> (kea/send-mail-with-y) +>>> (add-hook 'message-send-hook 'kea/message-select-mail-dest) +> +> I will also mention an alternative approach to using hooks here. You +> could customise message-send-mail-function to be your own function which +> let binds the appropriate send-mail settings and have that call the +> actual send-mail function (eg message-send-mail-with-sendmail) +> +> Best wishes +> +> Mark