1 Return-Path: <Sebastian@SSpaeth.de>
\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 06CD84196F3
\r
6 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 00:13:12 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 96MEpOHT9h4O for <notmuch@notmuchmail.org>;
\r
16 Fri, 23 Apr 2010 00:13:11 -0700 (PDT)
\r
17 Received: from homiemail-a20.g.dreamhost.com (caiajhbdccah.dreamhost.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 2678D4196F2
\r
20 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 00:13:11 -0700 (PDT)
\r
21 Received: from sspaeth.de (mtec-hg-docking-1-dhcp-204.ethz.ch
\r
22 [129.132.133.204]) (Authenticated sender: sebastian@sspaeth.de)
\r
23 by homiemail-a20.g.dreamhost.com (Postfix) with ESMTPA id D5B757EC065;
\r
24 Fri, 23 Apr 2010 00:13:08 -0700 (PDT)
\r
25 Received: by sspaeth.de (sSMTP sendmail emulation);
\r
26 Fri, 23 Apr 2010 09:13:06 +0200
\r
27 From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>
\r
28 To: Dirk Hohndel <hohndel@infradead.org>, notmuch@notmuchmail.org
\r
29 Subject: Re: [notmuch] Fcc, Maildir, and Emacs message-mode -- a bit of code
\r
30 In-Reply-To: <m3bpdbrsa7.fsf@x200.gr8dns.org>
\r
31 References: <873a1zs3t5.fsf@jhu.edu> <87ochbx3er.fsf@SSpaeth.de>
\r
32 <m3bpdbrsa7.fsf@x200.gr8dns.org>
\r
33 Date: Fri, 23 Apr 2010 09:13:06 +0200
\r
34 Message-ID: <87bpdaljzx.fsf@SSpaeth.de>
\r
36 Content-Type: text/plain; charset=us-ascii
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Fri, 23 Apr 2010 07:13:12 -0000
\r
51 On 2010-04-22, Dirk Hohndel wrote:
\r
52 > ;; This is the list of alternatives that should be configurable as
\r
53 > ;; defcustom (or simply set in .emacs for now)
\r
54 > (setq notmuch-fcc-dirs '(
\r
55 > ("Dirk Hohndel <dirk.hohndel@intel.com>" . "Maildir/Sent Items")
\r
56 > ("Dirk Hohndel <hohndel@infradead.org>" . "MaildirInfradead/Sent")))
\r
58 > ;This constructs a path, concatenating the content of the variable
\r
59 > ;"message-directory" and the second part in the alist:
\r
60 > (defun my-fcc-header-setup ()
\r
61 > (let ((subdir (cdr (assoc (message-fetch-field "from") notmuch-fcc-dirs))))
\r
62 > (message-add-header (concat "Fcc: " message-directory subdir))))
\r
63 > (add-hook 'message-send-hook 'my-fcc-header-setup)
\r
65 > The disadvantage is that with the message-send-hook I don't get to see /
\r
66 > correct the FCC line in the message buffer - but since I trust the logic
\r
67 > here (and tested it quite a bit), I'm less concerned about this.
\r
69 Another disadvantage is that this does not provide a fallback, so if you
\r
70 type "dirk" rather than "Dirk" in your from, the fcc dir will be nil, so
\r
71 it tries to deliver just to "message-directory". The user should be able
\r
72 to configure a default FCC dir, I think.
\r