From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44185 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 02:07:32 -0500 Organization: http://waxrat.com Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1018077021 18052 127.0.0.1 (6 Apr 2002 07:10:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2002 07:10:21 +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 16tkL7-0004h3-00 for ; Sat, 06 Apr 2002 09:10:21 +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 16tkJa-0002zA-00; Sat, 06 Apr 2002 01:08:46 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 06 Apr 2002 01:08:54 -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 BAA23220 for ; Sat, 6 Apr 2002 01:08:42 -0600 (CST) Original-Received: (qmail 28656 invoked by alias); 6 Apr 2002 07:08:12 -0000 Original-Received: (qmail 28651 invoked from network); 6 Apr 2002 07:08:11 -0000 Original-Received: from rtp-msg-core-1.cisco.com (161.44.11.97) by gnus.org with SMTP; 6 Apr 2002 07:08:11 -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 g3677uOI021513 for ; Sat, 6 Apr 2002 02:08:06 -0500 (EST) Original-Received: from zzz.cisco.com (zzz.cisco.com [10.89.5.93]) by spamsicle.cisco.com (Mirapoint) with ESMTP id AAF26163; Sat, 6 Apr 2002 02:07:32 -0500 (EST) Original-Received: (from zzz@localhost) by zzz.cisco.com (8.11.6/8.11.6) id g3677Wd03225; Sat, 6 Apr 2002 02:07:32 -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 (Michael Cook's message of "Wed, 03 Apr 2002 17:58:43 -0500") Original-Lines: 30 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44185 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44185 Michael Cook writes: > does anyone know offhand how to get nnmail-split-fancy to pay > attention to what's in my bbdb address book? ok, how about this: (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 (bbdb-search-simple (car comp) (cadr comp)) split))))) then, in nnmail-split-fancy, something like this: (setq nnmail-split-fancy '(| ... (: split-if-in-bbdb "from" "inbox") "other")) so, if the sender of the message is in your bbdb, then the message gets split into your inbox folder. otherwise, it gets split into your "other" folder. m.