Gnus development mailing list
 help / color / mirror / Atom feed
* Fancy splitting: storing outgoing messages in the same folder
@ 1997-04-06  0:14 Matt Pharr
  1997-04-06  1:19 ` David Moore
  1997-04-06  2:58 ` Jens Lautenbacher
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Pharr @ 1997-04-06  0:14 UTC (permalink / raw)



I'm making the big switch to using gnus for mail as well as news (now
placing all of my life under the rule of xemacs), and would like to save
outoging messages to people in the same nnfolder folder that incoming
messages from them are saved in. I've read the FAQ! I've read and re-read
the "Fancy Mail Splitting" section of the manual (and it befuddles me)!
I've checked out peoples' gnus.el files at
<URL:http://superdave.socom.com/gnus/>, but I still can't figure it out.

I've got myself in Bcc in the default headers, and need to get splitting to
do the rest of it. Given something like this:

(setq nnmail-split-abbrev-alist
      (append
       (list '(friends	.	"foo\\|bar")
	     '(me	.	"mmp")
	     '(to	.	"to")
	     '(subject     . "subject")
             '(from        . "from"))))

I'd like to do someting like:

(setq nnmail-split-fancy
      '(| (from friends "mail.friends")
	  (from me and to friends "mail.friends")   ;; <-- ack!
	  (from me "mail.mmp")
	  "mail.misc"))

Thanks in advance for any help...

-matt
-- 
Matt Pharr
mmp@graphics.stanford.edu
<URL:http://www-graphics.stanford.edu/~mmp>


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

* Re: Fancy splitting: storing outgoing messages in the same folder
  1997-04-06  0:14 Fancy splitting: storing outgoing messages in the same folder Matt Pharr
@ 1997-04-06  1:19 ` David Moore
  1997-04-06  2:58 ` Jens Lautenbacher
  1 sibling, 0 replies; 3+ messages in thread
From: David Moore @ 1997-04-06  1:19 UTC (permalink / raw)


Matt Pharr <mmp@graphics.stanford.edu> writes:

> I've got myself in Bcc in the default headers, and need to get splitting to
> do the rest of it. Given something like this:

> I'd like to do someting like:
> 
> (setq nnmail-split-fancy
>       '(| (from friends "mail.friends")
> 	  (from me and to friends "mail.friends")   ;; <-- ack!
> 	  (from me "mail.mmp")
> 	  "mail.misc"))

For the and situation you list you can do:

(setq nnmail-split-fancy
      '(| (from friends "mail.friends")
	  (from me
	    (to friends "mail.friends"))
	  (from me "mail.mmp")
	  "mail.misc"))


Or you might just want to use the preprovided 'any' instead of dealing
with from/to:

(setq nnmail-split-fancy
      '(| (any friends "mail.friends")
	  (from me "mail.mmp")
	  "mail.misc"))

Of course this behaves differently if you get a message sent to both you
and a friend by an "unknown".  The first will go in mail.misc, the
second will go in mail.friends.



My .gnus file on the web site does show this, but there are no
comments. :)  Note that I extend 'any' to include x-originally-to.  I
should probably just append on, rather than blasting over it.  I've
stuck a couple ';;; ' comments on the beginning of three lines to show
where this kind of an 'and' operation is being done.

Basically, you can make the 3rd arg to any split be another split, which 
is only tried if the message already matches.

The majority of my filing rules are filled in via another data-structure
which I use to specify a regexp and folder, as well as group specific
control info for bbdb.

(setq
 nnmail-split-abbrev-alist
 '((any . "from\\|to\\|cc\\|sender\\|apparently-to\\|resent-from\\|resent-to\\|resent-cc\\|x-originally-to")
   (mail . "mailer-daemon\\|postmaster\\|uucp"))
 nnmail-split-methods		'nnmail-split-fancy
 nnmail-split-fancy
 `(|
     ;; Sneak off duplicate message warnings.
     ("gnus-warning" "duplicate of message" "mail.duplicate")

     ;; Don't crosspost mailer daemon messages.
     ("from" mail "mail.daemon")

;;; HERE is an example of an 'and' like operation.  It must be from me
;;; and have the right subject.
     ;; Grab off timed reminders to myself.
     ("from" "dmoore"
      ("subject" "Auto-Anniversary\\|Auto-Birthday"
       "personal.danger.danger.will.robinson"))

     ;; Grab off mailing list admin mail instead of crossposting.
     (|
      (any "tinymuck-sloggers-\\(manager\||owner\\|request\\)@tcp.com"
	   "mail.list.muck.sloggers.admin")
      (any "ucsdsic-\\(owner\\|request\\)@oj.egbt.org"
	   "mail.list.ucsdsic.admin")
      (any "owner-ai@.*ucsd.edu"
	   "mail.list.ai.admin")
      )

     ;; Grab off crashs@xemacs.org also via a non-normal header.
     (any "crashes@xemacs.org" "mail.list.xemacs.crashes")
     ("X-Mailing-List" "crashes@xemacs.org" "mail.list.xemacs.crashes")

     ;; Crosspost everything else as appropriate, except don't file to
     ;; a person's box if we're hitting them on a list.
     (& 
      ;; Normal distribution boxes.
      ,@(mapcar '(lambda (x) (list 'any (car x) (cdr x)))
		(dmoore::gnus-procmail-select
		 dmoore::gnus-procmail-addresses-list nil '(create t nil)))
      ,@(mapcar '(lambda (x) (list "subject" (car x) (cdr x)))
		(dmoore::gnus-procmail-select
		 dmoore::gnus-procmail-subjects-list nil '(create t nil)))
      )

     ;; Do boxes for people, but first try the `From' address before
     ;; recipients.  Also don't crosspost any of this now, since I
     ;; tend to end up with junk when I hit E in one group and it just
     ;; gets marked at read in another.
     (|
      ,@(mapcar '(lambda (x) (list "From" (car x) (concat "people." (cadr x))))
		dmoore::gnus-procmail-people-list)
      ,@(mapcar '(lambda (x) (list 'any (car x) (concat "people." (cadr x))))
		dmoore::gnus-procmail-people-list)
      )

     ;; Anything else which is a followup to a message by me.  Optional
     ;; "s because I've had some mail come back with them.
     ("references\\|in-reply-to"
      "\"?rv[0-9a-z]+\\.fsf\"?@sdnp5\\.ucsd\\.edu"
      "mail.followup")

;;; HERE is a somewhat strange 'and' like operation, although we use 
;;; a complete split in the 3rd spot.
     ;; Grab off mail from xxx that has been bounced not forwarded.
     ;; Assume it goes into mail.list.yucks.
     ("Return-Path" "xxx@\\(\\|mailbox[12].\\)ucsd.edu"
      (|
       ("Newsgroups" "humor"			"mail.list.yucks")
       ("Newsgroups" "alt.sysadmin.recovery"	"mail.list.yucks")
       ("Newsgroups" "babylon5"			"mail.list.lurkers-ucsd")
       "people.xxx"))

;;; HERE is another 'and' like operation.  Must have both the correct
;;; return-path and the correct received headers.
     ;; Augh, someone bounces cert advisories to managers.
     ("Return-Path" "list-relay@\\(\\|mailbox[12].\\)ucsd.edu"
      ("Received" "by UCSD.EDU.* for <managers@ucsd.edu" "mail.list.managers"))

     ;; Totally unmatched mail.
     "mail.misc")
)



-- 
David Moore <dmoore@ucsd.edu>       | Computer Systems Lab      __o
UCSD Dept. Computer Science - 0114  | Work: (619) 534-8604    _ \<,_
La Jolla, CA 92093-0114             | Fax:  (619) 534-1445   (_)/ (_)
<URL:http://oj.egbt.org/dmoore/>    | In a cloud bones of steel.


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

* Re: Fancy splitting: storing outgoing messages in the same folder
  1997-04-06  0:14 Fancy splitting: storing outgoing messages in the same folder Matt Pharr
  1997-04-06  1:19 ` David Moore
@ 1997-04-06  2:58 ` Jens Lautenbacher
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Lautenbacher @ 1997-04-06  2:58 UTC (permalink / raw)
  Cc: ding

Matt Pharr <mmp@graphics.stanford.edu> writes:

> I'm making the big switch to using gnus for mail as well as news (now
> placing all of my life under the rule of xemacs), and would like to save
> outoging messages to people in the same nnfolder folder that incoming
> messages from them are saved in. I've read the FAQ! I've read and re-read
> the "Fancy Mail Splitting" section of the manual (and it befuddles me)!
> I've checked out peoples' gnus.el files at
> <URL:http://superdave.socom.com/gnus/>, but I still can't figure it out.
> 
> I've got myself in Bcc in the default headers, and need to get splitting to
> do the rest of it. Given something like this:
> 

Maybe you could just use the group parameter gcc-self set to t in all
groups you want this behaviour (Note: If you use topics, you can set
paramters in topics also and they apply to all groups under them.)
I do handle all my outgoing mail this way.

See the section on group parameters for more info.

    jtl


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

end of thread, other threads:[~1997-04-06  2:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-06  0:14 Fancy splitting: storing outgoing messages in the same folder Matt Pharr
1997-04-06  1:19 ` David Moore
1997-04-06  2:58 ` Jens Lautenbacher

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