Re: [Exim] Checking for sender_host_address

Top Page
Delete this message
Reply to this message
Author: Wild Karl-Heinz
Date:  
To: exim-users
Subject: Re: [Exim] Checking for sender_host_address
Hello...

I've tried the make a SMTP over POP with a dynamic liste in a MySQL Table.

I thought that the entry "host_accept_relay" accept a sql-statement in the
following
form:

host_accept_relay = localhost:mysql;MYSQL_RELAY

Is it possible or not? The try wasn't successfull.
Is there a working example available?
If possible I would like to use the information "Domain" as parameter to the
query.

Karl-Heinz


-----Original Message-----
From: Philip Hazel <ph10@???>
To: Dave Lewney <D.M.Lewney@???>
Cc: exim-users@??? <exim-users@???>
Date: Mittwoch, 26. Januar 2000 10:24
Subject: Re: [Exim] Checking for sender_host_address


>On Tue, 25 Jan 2000, Dave Lewney wrote:
>
>> I need to check whether a message has been sent from one of our
>> own networks which are of form
>>
>> a.b.c.d/19
>> e.f.g.h/20
>> j.k.l.m/21
>>
>> Is there an easier way than a long-winded check on $sender_host_address
>> with net19-lsearch;/my/networks
>>      net20-lsearch;/my/networks   and then
>>      net21-lsearch;/my/networks

>
>If you have enough of them to need to put them in a file, and you are
>testing the variable in some expanded string, then the answer is no. If
>there are only three of them, you can of course do the test in-line:
>
>${if or {
>{eq {${mask:$sender_host_address/19}} {10.9.8.7/19}}
>{eq {${mask:$sender_host_address/20}} {10.9.8.8/20}}
>{eq {${mask:$sender_host_address/21}} {10.9.8.9/21}}
>} {yes-string}{no-string}}
>
>but it's still rather tedious.
>
>If you are testing these in a host list like host_accept_relay, and I
>suspect you are since your syntax looks like that, then you can either
>
>(a) Put them inline
>
>host_accept_relay = 192.168.3.4/19 : 192.168.323.54/20 : 192.168.34.12/21
>
>(b) Put them in an interpolated file (i.e. *not* lsearch)
>
>host_accept_relay = /some/file
>
>
>--
>Philip Hazel            University of Cambridge Computing Service,
>ph10@???      Cambridge, England. Phone: +44 1223 334714.

>
>
>
>--
>## List details at http://www.exim.org/mailman/listinfo/exim-users Exim

details at http://www.exim.org/ ##
>