From: Bill White <billw@wolfram.com>
Subject: spam-check-BBDB bug?/bbdb whitelist split function
Date: Tue, 04 Feb 2003 22:15:31 -0600 [thread overview]
Message-ID: <ruofzr3tlb0.fsf@billwlx.wolfram.com> (raw)
I was futzing around defining my own "if he's in bbdb then he's not
spam" split function when I discovered spam-check-BBDB in spam.el:
----------------------------------------------------------------------
(defun spam-check-BBDB ()
"Mail from people in the BBDB is never considered spam"
(let ((who (message-fetch-field "from")))
(when who
(setq who (regexp-quote (cadr
(gnus-extract-address-components who))))
(if (bbdb-search-simple nil who)
nil spam-split-group))))
----------------------------------------------------------------------
It seems in my tests that bbdb-search-simple does not search for a
regexp but for a simple string representation of an address, so I
suspect the regexp-quote bit should be removed.
I've also adjusted this to return a positive match for bbdb persons;
folks who maintain bbdb as a whitelist might find it useful (adjust
for local conditions, YMMV, etc.):
----------------------------------------------------------------------
(defun billw-BBDB-whitelist ()
"BBDB is a whitelist."
(let ((who (message-fetch-field "from")))
(when who
(setq who (cadr (gnus-extract-address-components who)))
(if (bbdb-search-simple nil who)
(format-time-string "mail.misc.%Y.%m")
nil))))
(setq nnmail-split-fancy
'(|
("to" ".*billw@wri\\.com" "spamtrap")
("List-Id" ".*gnucash-announce\\.lists\\.gnucash\\.org.*" "gnucash-announce")
("List-Id" ".*gnucash-user\\.lists\\.gnucash\\.org.*" "gnucash-user")
("List-Id" ".*gnucash-devel\\.lists\\.gnucash\\.org.*" "gnucash-devel")
("List-Id" ".*gnucash-patches\\.lists\\.gnucash\\.org.*" "gnucash-patches")
("List-ID" ".*developer list for mt\\.el.*" "mt-el")
;; [...]
;; my bbdb is a whitelist: save these
(: billw-BBDB-whitelist)
;; check for scum
(: spam-stat-split-fancy)
;; non-whitelist non-spam: save these
(: (lambda nil (format-time-string "mail.misc.%Y.%m")))
))
----------------------------------------------------------------------
Cheers -
bw
--
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."
next reply other threads:[~2003-02-05 4:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-05 4:15 Bill White [this message]
2003-02-05 14:47 ` Ted Zlatanov
2003-02-05 14:59 ` Bill White
2003-02-05 17:57 ` Ted Zlatanov
2003-02-05 15:07 ` Niklas Morberg
2003-02-05 17:51 ` Ted Zlatanov
2003-02-10 8:13 ` spam-stat broken? (was: spam-check-BBDB bug?/bbdb whitelist split function) Niklas Morberg
2003-02-11 8:15 ` spam-stat broken? Niklas Morberg
2003-02-11 17:56 ` Ted Zlatanov
2003-02-11 20:28 ` Ted Zlatanov
2003-02-12 9:49 ` Niklas Morberg
2003-02-12 11:16 ` Ted Zlatanov
2003-02-12 13:44 ` Ted Zlatanov
2003-02-12 13:46 ` Ted Zlatanov
2003-02-12 15:00 ` The agent shows ghost messages (was: spam-stat broken?) Niklas Morberg
2003-02-12 15:48 ` The agent shows ghost messages Ted Zlatanov
2003-02-12 16:29 ` The agent shows ghost messages (was: spam-stat broken?) Kevin Greiner
2003-02-13 7:53 ` The agent shows ghost messages Niklas Morberg
2003-02-13 8:44 ` The agent shows ghost messages (was: spam-stat broken?) Niklas Morberg
2003-02-13 13:50 ` The agent shows ghost messages Kevin Greiner
2003-02-13 14:50 ` Niklas Morberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ruofzr3tlb0.fsf@billwlx.wolfram.com \
--to=billw@wolfram.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).