From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79227 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.gnus.general Subject: Re: checking several headers when splitting mail Date: Tue, 28 Jun 2011 03:00:22 +0200 Organization: my virtual residence Message-ID: <874o3a22jd.fsf@yun.yagibdah.de> References: <87zkliev2l.fsf@yun.yagibdah.de> <87tybcwh7h.fsf@yun.yagibdah.de> <87aad4umb5.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 1309222869 26408 80.91.229.12 (28 Jun 2011 01:01:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2011 01:01:09 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27523@lists.math.uh.edu Tue Jun 28 03:01:06 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 1QbMfo-0005D3-1j for ding-account@gmane.org; Tue, 28 Jun 2011 03:01:04 +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 1QbMfF-0002t1-Gv; Mon, 27 Jun 2011 20:00:29 -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 1QbMfD-0002st-1x for ding@lists.math.uh.edu; Mon, 27 Jun 2011 20:00:27 -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 1QbMfB-0004su-Ej for ding@lists.math.uh.edu; Mon, 27 Jun 2011 20:00:26 -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 1QbMf8-0002VJ-Sx for ding@gnus.org; Tue, 28 Jun 2011 03:00:22 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.76) (envelope-from ) id 1QbMf8-0006uP-88 for ding@gnus.org; Tue, 28 Jun 2011 03:00:22 +0200 Mail-Followup-To: ding@gnus.org In-Reply-To: (Andreas Schwab's message of "Tue, 28 Jun 2011 00:40:17 +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-1677--6721h-0s--0d--H*UA:Emacs, 0.000-1511--6058h-0s--0d--H*u:Emacs, 0.000-1401--5615h-0s--0d--H*UA:Gnus, 0.000-1401--5614h-0s--0d--H*u:Gnus, 0.000-1345--5392h-0s--0d--H*UA:linux Spam tokens: 0.997-1--0h-5s--0d--HX-Spam-Relays-External:sk:static., 0.997-1--0h-5s--0d--H*RU:sk:static., 0.966-5609--1328h-52215s--0d--H*r:quimby.gnus.org, 0.912-187--210h-2984s--0d--H*r:sk:static., 0.906-2983--3987h-52457s--0d--H*RU: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:79227 Archived-At: Andreas Schwab writes: > lee writes: > >> Andreas Schwab writes: >> >>> (from "root@yun\\.yagibdah\\.de" >>> ("Subject" "/var/log/.*" >>> "mail.sys.yun")) >> >> This doesn't work. > > In which way does it not work? It doesn't seem to have any effects. I expected it to yield an error message, and to my surprise it didn't. When I press B q on a message that supposedly would match, like ,---- | From: root | Subject: /var/log/exim4/rejectlog `---- ... gnus says it'll go to mail.0-incoming. That's the group into which all mail goes that isn't put somewhere else by a splitting rule it matches. >> What actually is a SPLIT? > > Any of the forms described in the doc string. The documentation has an example which I find very confusing and says: ,---- [ 6.3.6 Fancy Mail Splitting ] | A split is a (possibly) recursive structure where each split may | contain other splits. Here are the possible split syntaxes: | | `group' | If the split is a string, that will be taken as a group name. | Normal regexp match expansion will be done. See below for | examples. |[...] `---- The definition of a SPLIT is recursive: It only tells me that a SPLIT is a structure which can be recursive and can contain other structures which can be recursive and can contain other structures which can be recursive and can contain other structures which can be recursive --- and so on, until there's a stack overflow. It doesn't tell me what a SPLIT is, other than that it is a structure. A group name like "mail.sys.yun" is not a structure, so that cannot be a SPLIT. Hence the list of possible split syntaxes produces syntax errors when I read it ... When I started trying to figure it out, after quite a while I put the following comment about nnmail-split-fancy into my ~/.gnus file to get an idea about what a SPLIT might be: ,---- | ;; order DOES matter | ;; (| split split split ... GRUPPE) | ;; (& split split split ... GRUPPE) | ;; split = (HEADER REGEXP GRUPPE) | ;; If the split is `nil', it is ignored. `---- GRUPPE means the group the mail is put into. Perhaps I'm totally mistaken since I don't understand the documentation. If I understand it correctly, I think there is no way to check on several headers other than to write my own function for it and call it in a splitting rule. Try it :)