Re: [exim] (no subject)

Startseite
Nachricht löschen
Nachricht beantworten
Autor: David S. Madole
Datum:  
To: Chris Jensen, exim-users
CC: 
Betreff: Re: [exim] (no subject)
From: "Chris Jensen" <cjensen@???>
>
> I can't figure out how to successfully identify internal sender IP's
> from within a filter, I was hoping for something along the lines of
>
> # Set n1 to 1 if this is a local message
> if ${match_address{$sender_host_address}{$relay_from_hosts}} is 1
>  then
>    add 1 to n1
> endif


match_address is an expansion conditional, it needs to be used inside of
an *expansion* if statement, not a *filter* if statement.

Do something like this instead:

if ${if
match_address{$sender_host_address}{$relay_from_hosts}{true}{false}} is
true
then
add 1 to n1
endif

or you could just

add ${if match_address{$sender_host_address}{$relay_from_hosts}{1}{0}} to
n1

You need to remember that you are dealing basically with two different
languages here, the string expansion language and the filter language.
You can't arbitrarily mix and match, you need to keep each within its own
context.

David