database error
[notmuch-archives.git] / 86 / 3ada7b8dc85881c91e5466bccc6653a73bc498
1 Return-Path: <david@belohrad.ch>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id AB0BE431FB6\r
6         for <notmuch@notmuchmail.org>; Wed,  3 Sep 2014 00:41:55 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id C4JYOheutxuc for <notmuch@notmuchmail.org>;\r
16         Wed,  3 Sep 2014 00:41:48 -0700 (PDT)\r
17 X-Greylist: delayed 1493 seconds by postgrey-1.32 at olra;\r
18         Wed, 03 Sep 2014 00:41:48 PDT\r
19 Received: from beesknees.cern.ch (beesknees.cern.ch [137.138.197.99])\r
20         (using TLSv1 with cipher AES128-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 7936C431FAF\r
23         for <notmuch@notmuchmail.org>; Wed,  3 Sep 2014 00:41:48 -0700 (PDT)\r
24 Received: from belohrad by beesknees.cern.ch with local (Exim 4.84)\r
25         (envelope-from <david@belohrad.ch>)\r
26         id 1XP4oF-0005o0-JL; Wed, 03 Sep 2014 09:16:51 +0200\r
27 From: David Belohrad <david@belohrad.ch>\r
28 To: Keith Amidon <camalot@picnicpark.org>,notmuch@notmuchmail.org\r
29 Subject: Re: sending email using different server for different 'From:' field\r
30 In-Reply-To: <1409668511.2507.32.camel@picnicpark.org>\r
31 References: <uaxzjei1a4j.fsf@beesknees.cern.ch>\r
32         <1409668511.2507.32.camel@picnicpark.org>\r
33 User-Agent: Notmuch/0.18~rc0+2~gbc64cdc (http://notmuchmail.org) Emacs/24.3.1\r
34         (x86_64-pc-linux-gnu)\r
35 Date: Wed, 03 Sep 2014 09:16:51 +0200\r
36 Message-ID: <uaxbnqxdvh8.fsf@beesknees.cern.ch>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Wed, 03 Sep 2014 07:41:55 -0000\r
52 \r
53 oukej. this seems to be exactly what I'm looking for. Is there a way how\r
54 to 'cycle' in notmuch different From: fields? I'd need to setup like 3\r
55 addresses, each of them with different signatures and be able to easily\r
56 switch between them....\r
57 \r
58 thanks\r
59 .d.\r
60 \r
61 \r
62 Keith Amidon <camalot@picnicpark.org> writes:\r
63 \r
64 > On Tue, 2014-09-02 at 14:26 +0200, David Belohrad wrote:\r
65 >> could that scenario be somehow fitted automatically, so when I overwrite\r
66 >> the default 'From:' address (by hand. is it possible to do some\r
67 >> automatic cycling?) to work address, so that message sender in emacs\r
68 >> would automatically use work exchange server to deliver the mail?\r
69 >\r
70 > I think this is more of a message-mode question than a notmuch question.\r
71 > I use something very similar to code attached below, which is rather\r
72 > brute-force, but does the job for me.\r
73 >\r
74 >              --- Keith\r
75 >\r
76 > -----\r
77 >\r
78 > (defun kea/send-mail-with-x ()\r
79 >   (interactive)\r
80 >   (setq smtpmail-smtp-server "smtp.x.com"\r
81 >         smtpmail-smtp-service 587\r
82 >         smtpmail-local-domain "x.com"\r
83 >         smtpmail-auth-user nil\r
84 >         smtpmail-stream-type 'starttls))\r
85 >\r
86 > (defun kea/send-mail-with-y ()\r
87 >   (interactive)\r
88 >   (setq smtpmail-smtp-server "email.y.com"\r
89 >         smtpmail-smtp-service 587\r
90 >         smtpmail-local-domain "y.com"\r
91 >         smtpmail-auth-user nil\r
92 >         smtpmail-stream-type 'starttls))\r
93 >\r
94 > (defun kea/message-select-mail-dest ()\r
95 >   (cond ((string-match "<kea@x.com>"\r
96 >                        (message-field-value "From"))\r
97 >          (kea/send-mail-with-x))\r
98 >         (t\r
99 >          (kea/send-mail-with-y))))\r
100 >\r
101 > (kea/send-mail-with-y)\r
102 > (add-hook 'message-send-hook 'kea/message-select-mail-dest)\r