Gnus development mailing list
 help / color / mirror / Atom feed
From: lee <lee@yun.yagibdah.de>
To: ding@gnus.org
Subject: Re: checking several headers when splitting mail
Date: Tue, 28 Jun 2011 03:00:22 +0200	[thread overview]
Message-ID: <874o3a22jd.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <m2r56e525q.fsf@igel.home> (Andreas Schwab's message of "Tue, 28 Jun 2011 00:40:17 +0200")

Andreas Schwab <schwab@linux-m68k.org> writes:

> lee <lee@yun.yagibdah.de> writes:
>
>> Andreas Schwab <schwab@linux-m68k.org> 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 <root@yun.yagibdah.de>
| 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 :)



  reply	other threads:[~2011-06-28  1:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 19:46 lee
2011-06-15 19:53 ` Tassilo Horn
2011-06-15 20:42   ` Andreas Schwab
2011-06-28 16:04     ` Ted Zlatanov
2011-06-28 18:04       ` Andreas Schwab
2011-06-28 19:01         ` Ted Zlatanov
2011-06-28 21:21           ` lee
2011-06-28 23:22             ` lee
2011-06-15 21:16   ` lee
2011-06-26  9:31 ` Lars Magne Ingebrigtsen
2011-06-26 19:00   ` lee
2011-06-26 19:26     ` Andreas Schwab
2011-06-27  0:53       ` lee
2011-06-27 22:40         ` Andreas Schwab
2011-06-28  1:00           ` lee [this message]
2011-06-28 18:03             ` Andreas Schwab
2011-06-28 19:16               ` lee
2011-06-26 19:37     ` Lars Magne Ingebrigtsen
2011-06-27  1:49       ` lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o3a22jd.fsf@yun.yagibdah.de \
    --to=lee@yun.yagibdah.de \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).