Re: [Exim] Filters: coping with repeated lines

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Paul Makepeace
CC: exim-users
題目: Re: [Exim] Filters: coping with repeated lines
On Thu, 9 Nov 2000, Paul Makepeace wrote:

> I'm trying to filter a mailing list using Sender: and have
> noticed messages slipping through. I'm assuming it's because,
> in those messages, there are two Sender: lines. Does this
> effectively mean I would have to use "contains" rather than
> "begins" everywhere? And is this guaranteed to work?
> (I.e. will exim check the second line?)


If you use $h_xxxx: to refer to a header line, and there is more than
one instance of the header, the reference gets all of them, separated by
newline characters. This is documented under "header variables" in the
filter spec.

> (I think begins should work on all lines or else "begins"
> is meaningless in multi-line situations.)


You could use a regular expression to look for text following a newline
if you really wanted to.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.