From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/14922 Path: main.gmane.org!not-for-mail From: Colin Rafferty Newsgroups: gmane.emacs.gnus.general Subject: Re: Split mail on two headers Date: 07 Apr 1998 15:35:13 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035154036 19019 80.91.224.250 (20 Oct 2002 22:47:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:47:16 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id MAA30348 for ; Tue, 7 Apr 1998 12:37:54 -0700 Original-Received: from sina.hpc.uh.edu (Sina.HPC.UH.EDU [129.7.3.5]) by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA19492 for ; Tue, 7 Apr 1998 14:37:36 -0500 (CDT) Original-Received: from sina.hpc.uh.edu (Sina.HPC.UH.EDU [129.7.3.5]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id OAH07210; Tue, 7 Apr 1998 14:37:27 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 07 Apr 1998 14:35:52 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id OAA07173 for ; Tue, 7 Apr 1998 14:35:37 -0500 (CDT) Original-Received: (qmail 23269 invoked by uid 504); 7 Apr 1998 19:35:21 -0000 Original-Received: (qmail 23266 invoked from network); 7 Apr 1998 19:35:20 -0000 Original-Received: from wfdutilf01.ml.com (HELO wfdutilgw.ml.com) (206.3.74.31) by claymore.vcinet.com with SMTP; 7 Apr 1998 19:35:20 -0000 Original-Received: from mail1.ml.com ([199.201.57.137]) by wfdutilgw.ml.com (8.8.7/8.8.7/MLgwo-3.05) with ESMTP id PAA28640 for ; Tue, 7 Apr 1998 15:31:56 -0400 (EDT) Original-Received: from pme-mail.spspme.ml.com (pme-mail.spspme.ml.com [169.242.123.95]) by mail1.ml.com (8.8.7/8.8.7/MLml5-3.06) with SMTP id PAA10015 for ; Tue, 7 Apr 1998 15:35:14 -0400 (EDT) Original-Received: from spssunp.spspme.ml.com by pme-mail.spspme.ml.com (SMI-8.6/ML55SMX-1.02) id PAA20016; Tue, 7 Apr 1998 15:35:14 -0400 Original-Received: by spssunp.spspme.ml.com (SMI-8.6/SMI-SVR4) id PAA29655; Tue, 7 Apr 1998 15:35:13 -0400 Original-To: (ding) GNUS Mailing List X-Face: ByE+UMAp1klWR3?\RNGx(A-~Ri!YT%C6M!sxoJL+.;9`Q/|+dj7[KR>gGMyV.2qZeot0NI`4\MA^_Qg`F9=+Ox&zaE?Y9dV%F~Xzf';Zyk2Aobs.uu^Ey0_C6^~q';G#$HkA!ZAHXPpG-"*|Dd*Z4U$4y{{aI0c%75}i~Of(jxYtI[uIpYF<*Zoe|\*/ufb X-Y-Zippy: Don't hit me!! I'm in the Twilight Zone!!! In-Reply-To: Harry Putnam's message of "07 Apr 1998 11:30:28 -0700" Original-Lines: 56 X-Mailer: Gnus v5.6.3/XEmacs 21.0(beta34) - "Oberhasli" Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:14922 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:14922 Harry Putnam writes: > Probably should be using 'fancy-splitting' but have tried to read it > several times, and it is just to complicated for my level of > experience. (A 'correct' way of saying: I couldn't make heads or tails > of it) For getting started with fancy splitting, just start it at one simple level to do your basic splitting. Then add fancy stuff as you need it later. > I want to see a regexp capable of splitting a message on both 'From' and > 'To' headers. In other words some way to match on more than one line. You cannot do this in basic or fancy splitting. Everything is just one line at a time. > Something like this seems it should work to split Joes' mail to me into > 'Box' and let his mail to go in a different direction, but > does not. > ("Box" "From:.*Joe Blow\\(.\\|\n\\)*To:.*reader") This is one of my fancy mail splitting rules that does something similar to what you want: (from mail (| ("\\(resent-\\)?\\(to\\|cc\\)" "craffert" "mail.daemon") "mail.auto.spam")) `from' and `mail' are predefined regexp's that match the "From:" field and the mailer-daemon sender, respectively. If a message is "from" "mail", then I do a subsplit. If it is actually "to" me, I want it in "mail.daemon". If it is not to me, it is probably spam, so put it in the spam box. Your version may look like this: (from "Joe_Blow" (| ("\\(resent-\\)?\\(to\\|cc\\)" "reader" "Box") "Different.Box")) > So can it be made to match on more than one line in the 'head'? No. You could write your own split function to do that, but it might be more work than you need. > Or, even more complicated, can it be made to match on a string in the > body? (might be fun to play with) No. You cannot even write a split function that does this, since the split is called narrowed to the header. -- Colin