[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fight spam with BBDB database?
From: |
Richard Wellum |
Subject: |
Re: Fight spam with BBDB database? |
Date: |
Thu, 27 May 2004 16:16:50 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (usg-unix-v) |
David Z Maze <dmaze@mit.edu> writes:
It looks cool - but my idea behind using BBDB was for the simplicity -
this is just too complicated.
||Rich
> Richard Wellum <rwellum@cisco.com> writes:
>
>> It's just an idea, wanted to see if it was possible. Could I filter all
>> email from users not in my BBDB database into a SPAM folder? That way I
>> could run through the SPAM folder periodically, if there is a legitimate
>> email in there I simply add to my BBDB database, and the next time it
>> will go into my Inbox?
>
> That's not a great way to hunt for spam, in my experience, especially
> if you include "viruses" in "spam". (In particular, if you subscribe
> to open mailing lists, you'll get spam addressed to the mailing list
> and won't be able to tell it from legitimate mail to the list without
> extra filtering.) But this strategy is still somewhat close to what I
> do, which looks sort of like this:
>
> (defvar dzm-bbdb-known-group "mail.known")
>
> (defun dzm-bbdb-split-to-known ()
> (cons '&
> (apply 'nconc
> (mapcan
> (lambda (rec)
> (let ((nets (bbdb-record-net rec)))
> (cons
> (mapcar
> (lambda (net)
> (list 'any (regexp-quote net)
> dzm-bbdb-known-group))
> nets))))
> (bbdb-records)))))
> ;; Gee, I must have written that around when I was taking 6.001.
>
> (setq nnmail-split-fancy
> `(| ;; note backquote
> (: spam-split) ;; using spam.el
> (&
> (to "debian-\\(\\w*\\)@lists\\.debian\\.org" "debian.\\1")
> (to "ding@gnus\\.org" "gnus.ding")
> ;; etc.
> )
> ,(dzm-bbdb-split-to-known)
> (any "dmaze@.*mit\\.edu" "mail.personal")
> ;; anything else:
> "mail.impersonal"))
>
> So, the sorting rules sort to the first of:
>
> (1) Spam groups as defined by spam-split;
> (2) Mailing lists, cross-posting appropriately;
> (3) People I know into mail.known;
> (4) Mail addressed to me into mail.personal;
> (5) Anything else into mail.impersonal.
>
> (The actual implementation of (3) uses (bbdb-record-getprop rec
> 'mail-group) to get the value of the mail-group field of each record,
> tests if that's set, and if so emits splits pointing there as opposed
> to elsewhere. So, one group per person, with crossposting.)
>
> --
> David Maze dmaze@mit.edu http://www.mit.edu/~dmaze/
> "Theoretical politics is interesting. Politicking should be illegal."
> -- Abra Mitchell