From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79213 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.gnus.general Subject: Re: checking several headers when splitting mail Date: Mon, 27 Jun 2011 02:53:34 +0200 Organization: my virtual residence Message-ID: <87aad4umb5.fsf@yun.yagibdah.de> References: <87zkliev2l.fsf@yun.yagibdah.de> <87tybcwh7h.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 1309136072 29775 80.91.229.12 (27 Jun 2011 00:54:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2011 00:54:32 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27510@lists.math.uh.edu Mon Jun 27 02:54:28 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 1Qb05s-00012Q-3k for ding-account@gmane.org; Mon, 27 Jun 2011 02:54:28 +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 1Qb056-0005aB-VD; Sun, 26 Jun 2011 19:53:41 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Qb055-0005a2-EM for ding@lists.math.uh.edu; Sun, 26 Jun 2011 19:53:39 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Qb053-0000KQ-Sg for ding@lists.math.uh.edu; Sun, 26 Jun 2011 19:53:38 -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 1Qb051-0008T9-Gb for ding@gnus.org; Mon, 27 Jun 2011 02:53:35 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.76) (envelope-from ) id 1Qb050-00088v-Py for ding@gnus.org; Mon, 27 Jun 2011 02:53:34 +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-1676--6706h-0s--0d--H*UA:Emacs, 0.000-1511--6046h-0s--0d--H*u:Emacs, 0.000-1401--5605h-0s--0d--H*UA:Gnus, 0.000-1401--5604h-0s--0d--H*u:Gnus, 0.000-1346--5384h-0s--0d--H*u:linux Spam tokens: 0.997-1--0h-4s--0d--HX-Spam-Relays-External:sk:static., 0.997-1--0h-4s--0d--H*RU:sk:static., 0.966-5582--1327h-52095s--0d--H*r:quimby.gnus.org, 0.912-186--210h-2979s--0d--H*r:sk:static., 0.905-2958--3983h-52336s--0d--HX-Spam-Relays-External:quimby.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:79213 Archived-At: Andreas Schwab writes: > lee writes: > >> 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. > > Except that it doesn't work like that: Hm, you're right. I tested it again and found that everything sent from root is put into mail.sys.yun, regardless of the subject. > If you want the mail to be delivered only when *both* conditions > match, you need to nest the splits: Yes, that's what I want :) > (from "root@yun\\.yagibdah\\.de" > ("Subject" "/var/log/.*" > "mail.sys.yun")) This doesn't work. I wonder that it doesn't produce an error message. I spent quite some time trying to understand the documentation about fancy splitting, and obviously I failed. What actually is a SPLIT?