Gnus development mailing list
 help / color / mirror / Atom feed
* There's gotta be an easier way...
@ 1999-12-04  0:31 dave-mlist
  1999-12-05 22:55 ` Kai Großjohann
  0 siblings, 1 reply; 3+ messages in thread
From: dave-mlist @ 1999-12-04  0:31 UTC (permalink / raw)


Here's my split methods (with some names changed to protect the guilty):
There must be an easier way.  Tell me what you think.

Objectives: (1) to have all mailing list mail separated into groups
with the same name as the mailing list.  (2) to have non-list mail
filed under the email address it was sent to.

here's what nnmail-split-fancy evals to:
(| ("to\\|cc" "\\(dave\\|fred\\|ethel\\|barney\\)\\(-?[^@]*\\)@\\(bfnet.com\\|wuertele.com\\|this.net\\|that.net\\|andtheother.net\\)" "\\&") ("sender\\|to\\|cc" ".*ding.*" "ding") ("sender\\|to\\|cc" ".*netfilter.*" "netfilter") ("sender\\|to\\|cc" ".*netdev.*" "netdev") ("sender\\|to\\|cc" ".*tcpsat.*" "tcpsat") ("sender\\|to\\|cc" ".*etcetera.*" "etcetera"))

Dave

(setq nnmail-split-methods 'nnmail-split-fancy)
(setq nnmail-split-fancy 
      (let ((domains (list "bfnet.com" "wuertele.com" "this.net" "that.net" "andtheother.net"))
	    (usernames (list "dave" "fred" "ethel" "barney"))
	    (groupnames (list "ding" "netfilter" "netdev" "tcpsat" "etcetera"))
	    )
	(append '(|)

                ; setup a group for each personal email sent to 
		(list
		 (list
		  "to\\|cc"
		 (concat
		  "\\("
		  (mapconcat (lambda (username)
			       (format "%s" username))
			     usernames "\\|")
                  ; this part in parens is for qmail name extensions
		  "\\)\\(-?[^@]*\\)@\\("
		  (mapconcat (lambda (domain)
			       (format "%s" domain))
			     domains "\\|")
		  "\\)"
		  )
		 "\\&"))

                ; setup groups for each mailing list
		(mapcar (lambda (groupname) (list "sender\\|to\\|cc" (format ".*%s.*" groupname) groupname)) groupnames)
		))
      )


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

* Re: There's gotta be an easier way...
  1999-12-04  0:31 There's gotta be an easier way dave-mlist
@ 1999-12-05 22:55 ` Kai Großjohann
  1999-12-08 15:16   ` E. David Bell
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 1999-12-05 22:55 UTC (permalink / raw)
  Cc: ding

It is possible to integrate BBDB with Gnus mail splitting somehow.  I
don't remember the details, and I don't know whether and/or how it
works, but the general idea is that you add a `gnus-group' field to
some BBDB records, and subsequently mails to/from that person will be
put into the group given in the gnus-group field.  Of course, you need
additional setup to enable that feature.

The details may well be wrong, but maybe the above is sufficent for
you to find it.  I also vaguely remember a difference between `public'
and `private' in that context, but I don't know what that means.

kai
-- 
A preposition is not a good thing to end a sentence with.


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

* Re: There's gotta be an easier way...
  1999-12-05 22:55 ` Kai Großjohann
@ 1999-12-08 15:16   ` E. David Bell
  0 siblings, 0 replies; 3+ messages in thread
From: E. David Bell @ 1999-12-08 15:16 UTC (permalink / raw)


>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:

  Kai> It is possible to integrate BBDB with Gnus mail splitting
  Kai> somehow.  

[snip]


I've been using BBDB-based splitting for some time now.  You'll need
gnus-bbdb from:
 <URL:http://www.cs.ubc.ca/spider/edmonds/usenet/gnus/gnus-bbdb.el>

You can simply set nnmail-split-methods to gnus-bbdb-split-method.

Alternatively, you can use nnmail-split-fancy with the gnus-bbdb
function but that requires a minor tweak to the gnus-bbdb.el


  Kai> The details may well be wrong, but maybe the above is sufficent
  Kai> for you to find it.  I also vaguely remember a difference
  Kai> between `public' and `private' in that context, but I don't
  Kai> know what that means.

'gnus-private' is used for regular email to handle splitting by
sender.  The problem with sorting incoming mail by sender is that
mailing list emails could end up in a whole bunch of different groups
if the senders are in your BBDB ('gnus-private').  'gnus-public'
alleviates this problem by splitting the message to the mailing list
group first.  If crossposting is disabled, then the message ends up
only in the mailing list group and none of the individual groups.

-- 
-David
________________________________________________________________
E. David Bell                       |        d.bell@motorola.com
Motorola Semiconductor Israel Ltd.  |            +972-9-952-2685




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

end of thread, other threads:[~1999-12-08 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-04  0:31 There's gotta be an easier way dave-mlist
1999-12-05 22:55 ` Kai Großjohann
1999-12-08 15:16   ` E. David Bell

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