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: Mon, 27 Jun 2011 03:49:10 +0200	[thread overview]
Message-ID: <87iprst561.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <m3y60oxu2e.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Sun, 26 Jun 2011 21:37:45 +0200")

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> lee <lee@yun.yagibdah.de> 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?



      reply	other threads:[~2011-06-27  1:49 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
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 [this message]

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=87iprst561.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).