Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael Cook <michael@waxrat.com>
Subject: Re: bbdb and nnmail-split-fancy
Date: Sat, 06 Apr 2002 12:20:58 -0500	[thread overview]
Message-ID: <g08g028g2v9.fsf@zzz.cisco.com> (raw)
In-Reply-To: <86zo0h5l88.fsf@duchess.twilley.org>

Jack Twilley <jmt+usenet@twilley.org> 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.



  reply	other threads:[~2002-04-06 17:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-03 22:58 Michael Cook
2002-04-04  0:49 ` David Z Maze
2002-04-06  7:07 ` Michael Cook
2002-04-06  7:39 ` Jack Twilley
2002-04-06 17:20   ` Michael Cook [this message]
2002-04-06 20:46     ` Jack Twilley

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=g08g028g2v9.fsf@zzz.cisco.com \
    --to=michael@waxrat.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).