1 Return-Path: <BATV+bfcd26d6da2a49b2fc9f+2418+infradead.org+hohndel@bombadil.srs.infradead.org>
\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 24EF64196F0
\r
6 for <notmuch@notmuchmail.org>; Wed, 7 Apr 2010 13:05:01 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 zUwhwh6pUkpk for <notmuch@notmuchmail.org>;
\r
16 Wed, 7 Apr 2010 13:05:00 -0700 (PDT)
\r
17 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 566FE431FC1
\r
19 for <notmuch@notmuchmail.org>; Wed, 7 Apr 2010 13:05:00 -0700 (PDT)
\r
20 Received: from localhost ([::1] helo=localhost.localdomain)
\r
21 by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux))
\r
22 id 1NzbUb-0002Uq-Te; Wed, 07 Apr 2010 20:04:54 +0000
\r
23 Received: by localhost.localdomain (Postfix, from userid 500)
\r
24 id 6A028C00DB; Wed, 7 Apr 2010 13:04:53 -0700 (PDT)
\r
25 From: Dirk Hohndel <hohndel@infradead.org>
\r
26 To: Jameson Rollins <jrollins@finestructure.net>, notmuch@notmuchmail.org
\r
27 Subject: Re: [notmuch] Fcc, Maildir, and Emacs message-mode -- a bit of code
\r
28 In-Reply-To: <878wbj4nfq.fsf@servo.finestructure.net>
\r
29 References: <873a1zs3t5.fsf@jhu.edu> <878wbj4nfq.fsf@servo.finestructure.net>
\r
30 Date: Wed, 07 Apr 2010 13:04:53 -0700
\r
31 Message-ID: <m34ojnxc4a.fsf@x200.gr8dns.org>
\r
33 Content-Type: text/plain; charset=us-ascii
\r
34 X-SRS-Rewrite: SMTP reverse-path rewritten from <hohndel@infradead.org> by
\r
35 bombadil.infradead.org See http://www.infradead.org/rpr.html
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.13
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Wed, 07 Apr 2010 20:05:01 -0000
\r
50 On Wed, 27 Jan 2010 09:44:41 -0500, Jameson Rollins <jrollins@finestructure.net> wrote:
\r
51 > Hey, folks. Following up on this thread about better fcc handling,
\r
52 > Jesse passed on a simple python script he wrote that uses the python
\r
53 > "mailbox" module to deliver a message on stdin to a specified maildir
\r
54 > directory. It's very a simple, elegant and general purpose script
\r
57 > I then put the following in my notmuch .emacs to use the new script in
\r
58 > message-mode to fcc sent mail to my ~/.mail/sent directory:
\r
61 > (defun maildir-deliver-region(destdir)
\r
62 > (shell-command-on-region
\r
63 > (point-min) (point-max)
\r
64 > (concat "maildir-deliver.py -c -s -d " destdir)))
\r
65 > (setq message-fcc-handler-function 'maildir-deliver-region)
\r
66 > (defun my-message-header-setup ()
\r
67 > (message-add-header "Fcc: ~/.mail/sent"))
\r
68 > (add-hook 'message-send-hook 'my-message-header-setup)
\r
70 This is really nice - just what I needed. Well, almost.
\r
72 Instead of passing in destdir it would be even better if the lisp code
\r
73 figured out which MailDir to use. So we'd have a configuration variable
\r
74 that matched From addresses to MailDirs
\r
75 "dirk@hohndel.org" "~/MailDirHohndel"
\r
76 "dirk.hohndel@intel.com" "~/MailDirIntel"
\r
78 And just for safety used the passed in destdir as fallback / default.
\r
80 Anyone willing / able to add this? I can't lisp to save my life...
\r
86 Intel Open Source Technology Center
\r