From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44187 Path: main.gmane.org!not-for-mail From: Michael Cook Newsgroups: gmane.emacs.gnus.general Subject: Re: bbdb and nnmail-split-fancy Date: Sat, 06 Apr 2002 12:20:58 -0500 Organization: http://waxrat.com Sender: owner-ding@hpc.uh.edu Message-ID: References: <86zo0h5l88.fsf@duchess.twilley.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1018113946 13019 127.0.0.1 (6 Apr 2002 17:25:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2002 17:25:46 +0000 (UTC) Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16ttwf-0003Ns-00 for ; Sat, 06 Apr 2002 19:25:45 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16ttsn-0004T1-00; Sat, 06 Apr 2002 11:21:45 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 06 Apr 2002 11:21:53 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id LAA24783 for ; Sat, 6 Apr 2002 11:21:41 -0600 (CST) Original-Received: (qmail 25926 invoked by alias); 6 Apr 2002 17:21:27 -0000 Original-Received: (qmail 25921 invoked from network); 6 Apr 2002 17:21:26 -0000 Original-Received: from rtp-msg-core-1.cisco.com (161.44.11.97) by gnus.org with SMTP; 6 Apr 2002 17:21:26 -0000 Original-Received: from spamsicle.cisco.com (localhost [127.0.0.1]) by rtp-msg-core-1.cisco.com (8.12.2/8.12.2) with ESMTP id g36HLLtK005668 for ; Sat, 6 Apr 2002 12:21:22 -0500 (EST) Original-Received: from zzz.cisco.com (zzz.cisco.com [10.89.5.93]) by spamsicle.cisco.com (Mirapoint) with ESMTP id AAF26349; Sat, 6 Apr 2002 12:20:58 -0500 (EST) Original-Received: (from zzz@localhost) by zzz.cisco.com (8.11.6/8.11.6) id g36HKws07505; Sat, 6 Apr 2002 12:20:58 -0500 Original-To: ding@gnus.org X-Face: (::$,F}2XQ8GxBqsXCX?#09yY8mkcV?KEWi->CVJP*t3$PVv?E?;Fk34-6ppt@j'g?kWY_[ d:Xe(0a{$'N_Pv>/P&%U'\V`vimMH`er!2Z&*I]s-MWnUH]Ck+.D!"u`\LtI~'`N@I:o$a writes: > There are more sophisticated ways to get nnmail-split-fancy to work > with bbdb. > > I have records for people that have gnus-private values and records > for mailing lists that have gnus-public values. It's bbdb-gnus.el in > bbdb. Very straightforward stuff. the downside is that you need to manage those gnus-private and gnus-public values in the bbdb records. which is a little more work, at least. the split-if-in-bbdb approach doesn't require you to edit any of your bbdb records. and it makes for a nice spam detection heuristic. if someone sends me mail, even if they address it directly to me (like most spammers seem to do these days), it'll still get split into my "other" folder instead of into my "inbox" folder. i need to scan my other folder's *summary* buffer occasionally to see if any non-spam ended up there. but if that happens, i just select the non-spam message and type `:' to add the sender to my bbdb. kinda nice, i think. btw, here is is again with a minor fix: (defun split-if-in-bbdb (field split) ;; FIELD is "from" or "to" or "cc". ;; SPLIT is an `nnmail-split-fancy' "split" construct. (let ((from (message-fetch-field field))) (and from (let ((comp (condition-case () (mail-extract-address-components from) (error nil)))) (and comp (bbdb-search-simple (car comp) (cadr comp)) split))))) m.