From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/10563 Path: main.gmane.org!not-for-mail From: David Moore Newsgroups: gmane.emacs.gnus.general Subject: Re: Fancy splitting: storing outgoing messages in the same folder Date: 05 Apr 1997 18:19:23 -0700 Sender: dmoore@sdnp5.ucsd.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035150413 25102 80.91.224.250 (20 Oct 2002 21:46:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:46:53 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id RAA08731 for ; Sat, 5 Apr 1997 17:27:30 -0800 Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Sun, 6 Apr 1997 03:17:49 +0200 Original-Received: (qmail 12745 invoked by uid 504); 6 Apr 1997 01:15:19 -0000 Original-Received: (qmail 12742 invoked from network); 6 Apr 1997 01:15:18 -0000 Original-Received: from mailbox1.ucsd.edu (132.239.1.53) by claymore.vcinet.com with SMTP; 6 Apr 1997 01:15:17 -0000 Original-Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by mailbox1.ucsd.edu (8.8.5/8.6.9) with SMTP id RAA22670 for ; Sat, 5 Apr 1997 17:17:45 -0800 (PST) Original-Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4) id RAA24757; Sat, 5 Apr 1997 17:19:24 -0800 Original-To: ding@gnus.org X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L Mail-Copies-To: never In-Reply-To: Matt Pharr's message of 05 Apr 1997 17:14:48 -0700 Original-Lines: 141 X-Mailer: Gnus v5.4.40/XEmacs 20.1(beta11) Xref: main.gmane.org gmane.emacs.gnus.general:10563 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:10563 Matt Pharr 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 | Computer Systems Lab __o UCSD Dept. Computer Science - 0114 | Work: (619) 534-8604 _ \<,_ La Jolla, CA 92093-0114 | Fax: (619) 534-1445 (_)/ (_) | In a cloud bones of steel.