From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79214 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 03:49:10 +0200 Organization: my virtual residence Message-ID: <87iprst561.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 1309139389 10706 80.91.229.12 (27 Jun 2011 01:49:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2011 01:49:49 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27511@lists.math.uh.edu Mon Jun 27 03:49:45 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 1Qb0xL-0007iO-Qa for ding-account@gmane.org; Mon, 27 Jun 2011 03:49:44 +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 1Qb0wy-0005oE-Po; Sun, 26 Jun 2011 20:49:20 -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 1Qb0ww-0005o4-3M for ding@lists.math.uh.edu; Sun, 26 Jun 2011 20:49:18 -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 1Qb0wr-0000Re-Gn for ding@lists.math.uh.edu; Sun, 26 Jun 2011 20:49:17 -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 1Qb0wp-0001Ms-HN for ding@gnus.org; Mon, 27 Jun 2011 03:49:11 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.76) (envelope-from ) id 1Qb0wp-0008AR-0I for ding@gnus.org; Mon, 27 Jun 2011 03:49:11 +0200 Mail-Followup-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 26 Jun 2011 21:37:45 +0200") 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-5583--1327h-52102s--0d--H*r:quimby.gnus.org, 0.912-186--210h-2979s--0d--H*r:sk:static., 0.905-2959--3983h-52343s--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:79214 Archived-At: Lars Magne Ingebrigtsen writes: > lee writes: > >> (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 >> ) > > [...] > >> 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? > > Does the following work? > > (& (from "root@yun\\.yagibdah\\.de") > ("Subject" "/var/log/.*") > "mail.sys.yun") > > I haven't tried tweaking the fancy splitting stuff in a while, but I > seem to remember something like that should work. > > Or: > > (& (from "root@yun\\.yagibdah\\.de" "") > ("Subject" "/var/log/.*" "") > "mail.sys.yun") Both of them seem to make otherwise unmatched mail go to mail.sys.yun. What is the effect of an empty string at the place where I would usually put the name of the destination group? I even had a version that used nil instead of a group name, and it didn't work. The documentation says that when a SPLIT is nil, the SPLIT is ignored. What exactly does that mean? I understand the (| thing like: (| (either one condition in this list matches) or "mail goes here") ... and processing stops at the first match found. And (& is like: (& (any of the conditions in this list may match) or "mail goes here") ... and processing does not stop at the first match found. This makes the (& thing seem primarily useful for splitting the same message into several different groups. What I don't understand is how it's possible to use the (& thing as: (& (any of the conditions in this list may match)) ... and processing does not stop at the first match found. That seems very irregular to me because you cannot use: (from "sender") ... or can you? And where does the mail go when none of the conditions in the list match when the "or" part is missing? The "(from "sender")" doesn't seem to be a SPLIT?? A SPLIT always seems to have three parts? If you can use it, what does it mean/do? Is it even /possible/ to use any of the above or a combination thereof to require several headers to match before a message is split into a destination group?