From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/56193 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: problem with bbdb whitelist filtering Date: Fri, 23 Jan 2004 16:20:59 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nd69a2wg4.fsf@collins.bwh.harvard.edu> References: <200401120935.i0C9ZbVV024046@loki.exolution.lan> <4nllocri65.fsf@collins.bwh.harvard.edu> <200401130845.i0D8jChq029589@loki.exolution.lan> <4nu12qi348.fsf@collins.bwh.harvard.edu> <200401220953.i0M9rFDm020430@loki.exolution.lan> <4noesvua0n.fsf@collins.bwh.harvard.edu> <200401231507.i0NF73FJ029804@loki.exolution.lan> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074910513 28675 80.91.224.253 (24 Jan 2004 02:15:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2004 02:15:13 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M4733@lists.math.uh.edu Sat Jan 24 03:15:06 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AkDKE-0002SM-00 for ; Sat, 24 Jan 2004 03:15:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1Ak8l6-0007xa-00; Fri, 23 Jan 2004 15:22:32 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1Ak8l1-0007xV-00 for ding@lists.math.uh.edu; Fri, 23 Jan 2004 15:22:27 -0600 Original-Received: from clifford.bwh.harvard.edu (clifford.bwh.harvard.edu [134.174.9.41]) by justine.libertine.org (Postfix) with ESMTP id 0592E3A01EE for ; Fri, 23 Jan 2004 15:22:27 -0600 (CST) Original-Received: from collins.bwh.harvard.edu (collins [134.174.9.80]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id i0NLL6U29924; Fri, 23 Jan 2004 16:21:06 -0500 (EST) Original-Received: from collins.bwh.harvard.edu (localhost [127.0.0.1]) by collins.bwh.harvard.edu (8.12.9+Sun/8.11.0) with ESMTP id i0NLL0vl012030; Fri, 23 Jan 2004 16:21:00 -0500 (EST) Original-Received: (from tzz@localhost) by collins.bwh.harvard.edu (8.12.9+Sun/8.12.9/Submit) id i0NLKxgf012027; Fri, 23 Jan 2004 16:20:59 -0500 (EST) Original-To: Martin Monsorno X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Martin Monsorno , ding@gnus.org In-Reply-To: <200401231507.i0NF73FJ029804@loki.exolution.lan> (Martin Monsorno's message of "Fri, 23 Jan 2004 16:07:03 +0100") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (usg-unix-v) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:56193 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:56193 On Fri, 23 Jan 2004, monsorno-usenet@exolution.de wrote: > ,---- > | (setq nnmail-split-methods 'nnmail-split-fancy > | nnmail-split-fancy '(| > | ("Gnus-Warning" ".*duplicate.*" "duplicates") > | (to "ding@\\(gnus\\.org\\|hpc.uh.edu\\)" "gnus-mailing-list") > | (: spam-split) > | ("X-Spammer" "white" (| > | (to "Martin.Monsorno.*@exolution\\.de" "work") > | (to "monsorno@gmx\\.de" "private") > | )) > | (to "Martin.Monsorno.*@exolution\\.de" "work-spam") > | (to "monsorno@gmx\\.de" "private-spam") > | "unsplitted-mail" > | )) > `---- > > So I want to do spam-checking after processing some > mailing-list-messages. What I want to achieve is, that spam sent to > my account at work should go to a different folder than spam sent to > my private address. Is this possible? I looked into the manual > again, but it doesn't seem so. (defun mm-split-on-BBDB () (let* ((spam-split-symbolic-return t) (to (message-fetch-field "To")) (ret (spam-split 'spam-use-BBDB-exclusive))) (when (eq ret 'spam) (if (eq "a" to) "a-spam" "b-spam")))) I think this function is what you want. Use it thus: (setq nnmail-split-fancy '(| ("Gnus-Warning" ".*duplicate.*" "duplicates") (to "ding@\\(gnus\\.org\\|hpc.uh.edu\\)" "gnus-mailing-list") ("X-Spammer" "white" (| (to "Martin.Monsorno.*@exolution\\.de" "work") (to "monsorno@gmx\\.de" "private"))) (: mm-split-on-bbdb) "unsplitted-mail")) In my example I compare for equality to "a" and return "a-spam", otherwise "b-spam". You can use string-match to get the match you want, and replace the "?-spam" names with your favorites. I hope this helps. If not, I can try to give you the exact function you need. > Maybe, just a word, that spam.el 'does not modify the checked > message in any way'. This would maybe help make things more clear > to people like me, ahem. Fixed in the CVS manual. Ted