[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
simple mail splitting: matching two different headers
From: |
Albert Reiner |
Subject: |
simple mail splitting: matching two different headers |
Date: |
11 Sep 2004 15:58:37 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Hi,
I want to split all the mail to and from concerning address foo@bar
according to the presence of some tag in the subject. So, e.g.,
From: foo@bar
Subject: Re: BAZ ... should go to mail.foo-bar.baz, and
Cc: foo@bar
Subject: QUUX ... to mail.foo-bar.quux, and
To: foo@bar
Subject: ... to mail.foo-bar.
>From the info file it seems I need to replace the usual regular
expressions with elisp functions like
(lambda (headers)
(and (??? "^\\(To\\|From\\|Cc\\): .*foo@bar")
(??? "^Subject: .* BAZ")))
where (??? regexp) returns true if regexp matches headers, just that I
don't know what to use for ???. I'm sure this must be exceedingly
simple for those who know elisp.
Thanks in advance,
Albert.
- simple mail splitting: matching two different headers,
Albert Reiner <=