Re: [Exim] copy mail according to IP

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Milos Prudek
CC: exim-users
Betreff: Re: [Exim] copy mail according to IP
On Wed, 15 Dec 1999, Milos Prudek wrote:

> > condition = ${if matches{$received:}{^.*1\\.2\\.3\\.4}{yes}{no}}
>
> "matches" is not defined in exim 3.03. I tried "match", it seems ok.
> "$received" is not defined in exim 3.03. I tried $message_headers
> instead, but the condition is never true, even when sender address is
> 1.2.3.4.


Typos, typos... or, alternatively, my brain fade. Or alternatively, I'm
just testing you... :-)

Of course it should be "match" rather than "matches", and it should be
"$h_received:" and not $received" in order to scan the Received:
headers. Certainly "$message_headers:" would not work.
"$message_headers" (without the colon) might.

And the regex could be improved too. Try

condition = ${if match{$h_received:}{1\\.2\\.3\\.4}{yes}{no}}


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