From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79204 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.gnus.general Subject: Re: checking several headers when splitting mail Date: Sun, 26 Jun 2011 21:00:50 +0200 Organization: my virtual residence Message-ID: <87tybcwh7h.fsf@yun.yagibdah.de> References: <87zkliev2l.fsf@yun.yagibdah.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309114892 23944 80.91.229.12 (26 Jun 2011 19:01:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Jun 2011 19:01:32 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27501@lists.math.uh.edu Sun Jun 26 21:01:25 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QauaB-0003O1-Qd for ding-account@gmane.org; Sun, 26 Jun 2011 21:01:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1QauZn-00042e-G1; Sun, 26 Jun 2011 14:00:59 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1QauZl-00042T-UB for ding@lists.math.uh.edu; Sun, 26 Jun 2011 14:00:57 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1QauZh-0000mX-OY for ding@lists.math.uh.edu; Sun, 26 Jun 2011 14:00:57 -0500 Original-Received: from static.73.179.46.78.clients.your-server.de ([78.46.179.73]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QauZf-0007pp-EG for ding@gnus.org; Sun, 26 Jun 2011 21:00:51 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.76) (envelope-from ) id 1QauZe-0007qA-KL for ding@gnus.org; Sun, 26 Jun 2011 21:00:50 +0200 Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-1847--5964h-0s--0d--H*u:Emacs, 0.000-1715--5539h-0s--0d--H*u:Gnus, 0.000-1646--5316h-0s--0d--H*u:linux, 0.000-1646--5316h-0s--0d--H*UA:linux, 0.000-1595--5151h-0s--0d--H*UA:gnu Spam tokens: 0.957-4160--1383h-51771s--0d--H*r:quimby.gnus.org, 0.925-240--193h-4039s--0d--H*r:sk:static., 0.882-1471--4102h-52056s--0d--HX-Spam-Relays-External:quimby.gnus.org, 0.882-1471--4102h-52056s--0d--H*RU:quimby.gnus.org, 0.881-1294--3702h-46663s--0d--H*Ad:D*gnus.org Autolearn status: no -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 2.0 HELO_DYNAMIC_IPADDR Relay HELO'd using suspicious hostname (IP addr 1) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79204 Archived-At: Lars Magne Ingebrigtsen writes: > lee writes: > >> how do you check several headers when splitting mail? With neither the >> normal splitting, nor fancy splitting I could figure out how to do that. > > Use an `&' rule. Thanks! The funny thing is that I just figured it out a few minutes ago and was going to post the solution here. On entering this group I'm seeing your answer :) As I already suspected, an (& ...) rule is needed. What I didn't expect is that it's surprisingly simple. I thought a SPLIT always has to have three parts and found that it doesn't. To give an example: (setq nnmail-split-fancy '(| ;; some splitting rules can go here (& (from "root@yun\\.yagibdah\\.de" "mail.sys.yun") ("Subject" "/var/log/.*" "mail.sys.yun")) ;; some more splitting rules can go here ) Above rule checks the from headers *and* the Subject: header and splits mail into the mail.sys.yun group only when both the from headers and the Subject: header matches. What looks strange to me is that I need to specify the group the mail should go into for both the "from" and the "Subject" test. Perhaps there's another way to do it?