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 2FCE5431FB6 for ; Tue, 1 Mar 2011 13:01:00 -0800 (PST) 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 ETdb0ga8ph65 for ; Tue, 1 Mar 2011 13:00:59 -0800 (PST) X-Greylist: delayed 385 seconds by postgrey-1.32 at olra; Tue, 01 Mar 2011 13:00:59 PST Received: from mail.sflc.info (mail.sflc.info [216.27.154.199]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2D942431FB5 for ; Tue, 1 Mar 2011 13:00:59 -0800 (PST) Received: from localhost (unknown [10.2.67.174]) by mail.sflc.info (Postfix) with ESMTPSA id B04C7B4C10C for ; Tue, 1 Mar 2011 20:54:02 +0000 (UTC) From: James Vasile To: notmuch Subject: Make MBox User-Agent: Notmuch/0.5-185-g854ab96 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 01 Mar 2011 15:54:32 -0500 Message-ID: <87d3mak1dj.fsf@softwarefreedom.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Tue, 01 Mar 2011 21:01:00 -0000 Sometimes I want to send a colleague a bunch of emails (for example, all the emails I've tagged todo or all the emails from an awesome contributor. Although notmuch usually speaks the language of maildirs, I find mboxes most convenient for attaching to emails. Their tools can usually handle it well. I've put a bit of elisp and python up: https://github.com/jvasile/notmuch2mbox The python's help screen: > Usage: > notmuch2mbox.py [options] [search terms] > > This program uses notmuch to search for the search terms, then outputs > any found emails in mbox format. > > > Options: > -h, --help show this help message and exit > -n NOTMUCH, --notmuch=NOTMUCH > Path to notmuch binary. > -o OUTFILE, --outfile=OUTFILE > Write mbox to specified path instead of stdout The python script does a search and spits out an mbox containing anything it finds in that search. The emacs function performs that task on the current search, saving the result to a file, which you can attach to an email, open in mutt or whatever. The elisp is in the starting comments to the python. I hope this is useful to somebody. It does the trick for me in working with mbox-dependent colleagues (e.g. mutt users). I prefer mutt's threaded view to notmuch's conversation view, so I've used it to browse emails too. Regards, James