From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79830 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: using bbdb in split methods Date: Mon, 05 Sep 2011 18:13:58 +0800 Message-ID: <87bouzthy1.fsf@ericabrahamsen.net> References: <87hb4rsa22.fsf@ucl.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1315217694 1271 80.91.229.12 (5 Sep 2011 10:14:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Sep 2011 10:14:54 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28124@lists.math.uh.edu Mon Sep 05 12:14:50 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R0WCX-0000AY-P0 for ding-account@gmane.org; Mon, 05 Sep 2011 12:14:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1R0WCA-0006LK-0h; Mon, 05 Sep 2011 05:14:26 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1R0WC7-0006L2-1E for ding@lists.math.uh.edu; Mon, 05 Sep 2011 05:14:23 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R0WC5-0005aY-69 for ding@lists.math.uh.edu; Mon, 05 Sep 2011 05:14:22 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1R0WC2-0002TL-8F for ding@gnus.org; Mon, 05 Sep 2011 12:14:18 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R0WC1-0008OS-99 for ding@gnus.org; Mon, 05 Sep 2011 12:14:17 +0200 Original-Received: from 114.250.123.178 ([114.250.123.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Sep 2011 12:14:17 +0200 Original-Received: from eric by 114.250.123.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 Sep 2011 12:14:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 114.250.123.178 User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:MDWgVq+Bxdn9BVwRxygas+t3yc4= X-Spam-Score: -4.2 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79830 Archived-At: On Mon, Sep 05 2011, Eric S Fraga wrote: > Hello, > > I get way too much email (don't we all?) but using gnus with splitting > helps tremendously in tackling this problem. I use fancy splitting and > everything works just fine. The majority of my emails get sent to > appropriate mail folders (work colleagues, mailing lists, etc.) and I'm > pretty happy with his. However, I still have a "catch all" folder that > takes any emails that have not been split off. This still ends up being > too big and I'm forced to look at it more often than I would like. > > I would like to further split emails that would end up here without > having to write any more rules based on specific "from" entries. What I > would like ideally is to be able to split off emails if the "from" or > even the "to" addresses are one that are known to BBDB, implying > messages from or to people I know or that I have corresponded with in > the past. > > Is this possible? Has anybody done this already? Any pointers to how > to do this would be very welcome! I assume that something should be > possible using the "(: FUNCTION args...)" form but this is where I get > stuck. Maybe I need help from somebody with BBDB expertise? > > Many thanks, > eric Unless I'm misunderstanding you, this is already built into BBDB. Give any BBDB record a "gnus-private" field with a gnus group name (ie "mail.myfriend"). Then set the following two variables: (setq nnmail-split-methods 'bbdb/gnus-split-method bbdb/gnus-split-nomatch-function 'nnmail-split-fancy) Splits will happen for BBDB records first, and then fall through to nnmail-split-fancy. That ought to do it… E