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: Sun, 26 Jun 2011 21:00:50 +0200	[thread overview]
Message-ID: <87tybcwh7h.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <m3iprtym42.fsf@quimbies.gnus.org>

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

> lee <lee@yun.yagibdah.de> writes:
>
>> how do you check several headers when splitting mail? With neither the
>> normal splitting, nor fancy splitting I could figure out how to do that.
>
> Use an `&' rule.

Thanks! The funny thing is that I just figured it out a few minutes ago
and was going to post the solution here. On entering this group I'm
seeing your answer :)

As I already suspected, an (& ...) rule is needed. What I didn't expect
is that it's surprisingly simple. I thought a SPLIT always has to have
three parts and found that it doesn't. 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.

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?



  reply	other threads:[~2011-06-26 19: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 [this message]
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

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