Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* help with splitting rules and help with bbdb
@ 2005-10-31 12:16 Martin Rubey
  2005-11-01  7:04 ` Zhang Wei
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Rubey @ 2005-10-31 12:16 UTC (permalink / raw)


Dear Gnus,

I'm currently switching to Gnus as mailreader and have some tiny difficulties
setting it up correctly. My situation is as follows:

* I'm subscribed to a few newsgroups.
* I get mail from a few mailing lists
* I want to split my incoming mail into several groups, partially by hand.


The first thing I wanted to do is to direct all mail from the mailing lists

axiom-developer, axiom-mail and axiom-math@nongnu.org  to a group mail.axiom.

So I customized

 '(nnmail-split-methods (quote (("mail.axiom" "^To:.*axiom-") 
                                ("mail.misc" ""))))

However, this doesn't catch all mail intended for the axiom mailing lists, of
course, since sometimes the keyword will be in the CC list, etc.

I looked at group splitting, but it looks quite complicated, I must
admit. Well, I'm open to any solution that works, of course.

The second problem is bbdb. Somehow, incoming mail doesn't get through to
it. Outgoing mail works great, thanks to some helpful individual Wolf! I have
the following in my .emacs:

(require 'bbdb)
(bbdb-initialize 'gnus 'message)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)

;;; TODO -- remove the mapconcat addition of commas, that get removed by m-t-h 
(defun wolf3-bbdb-add-recipients-to-bbdb () 
   "Add all recipients to BBDB, using this list of headers: 
         from, sender, 
         to, cc, bcc, 
         resent-from, resent-to, resent-cc, resent-bcc." 
   (let ((fields '("from" "sender" 
                   "to" "cc" "bcc" 
                   "resent-from" "resent-to" "resent-cc" "resent-bcc"))) 
     (mapc 
      (lambda (address) 
        (bbdb-annotate-message-sender address t t t)) 
      (save-restriction 
        (message-narrow-to-headers) 
        (message-tokenize-header (mapconcat 'message-fetch-field fields ",")))))) 
 
;;; Could go into many hooks: 
;;;        message-send-mail-hook       # too restricted 
;;;        message-send-news-hook       # too restricted 
;;;        message-send-hook            # just right!!! 
;;;        message-sent-hook            # too late 
(add-hook 'message-send-hook 'wolf3-bbdb-add-recipients-to-bbdb) 



In any case, I like Gnus already!

Martin


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: help with splitting rules and help with bbdb
  2005-10-31 12:16 help with splitting rules and help with bbdb Martin Rubey
@ 2005-11-01  7:04 ` Zhang Wei
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang Wei @ 2005-11-01  7:04 UTC (permalink / raw)


Martin Rubey <axiomize@yahoo.de> writes:

> The first thing I wanted to do is to direct all mail from the mailing lists
> axiom-developer, axiom-mail and axiom-math@nongnu.org  to a group mail.axiom.
> So I customized
>  '(nnmail-split-methods (quote (("mail.axiom" "^To:.*axiom-") 
>                                 ("mail.misc" ""))))
> However, this doesn't catch all mail intended for the axiom mailing lists, of
> course, since sometimes the keyword will be in the CC list, etc.
> I looked at group splitting, but it looks quite complicated, I must
> admit. Well, I'm open to any solution that works, of course.

With fancy splitting method, it's quite easy:

(setq nnmail-split-fancy
      '(| (any "axiom.*@nongnu.org" "mail.axiom")
	  "mail.misc"))
(setq nnmail-split-methods 'nnmail-split-fancy)


[...]


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-01  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-31 12:16 help with splitting rules and help with bbdb Martin Rubey
2005-11-01  7:04 ` Zhang Wei

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).