Re: [Exim] check host_accept_relay from script?

Pàgina inicial
Delete this message
Reply to this message
Autor: Dave C.
Data:  
A: Philip Hazel
CC: exim-users
Assumpte: Re: [Exim] check host_accept_relay from script?

Hrm.. My host_accept_relay is IP address based - no hostnames or
domains.. It contains a negation of a wildcard, but at the end, and I
beleive I can leave that off to accomplish the same result.. Byt the key
thing is that it contains IP _networks_, not individual addresses..


Say it contained:

10.34.0.0/18 : 192.168.5.0/24 : 192.168.19.0/24

If I put that in a file, one per line, and used

host_accept_relay = net-lsearch;/some/file

${lookup{$sender_host_address}net-lsearch{/some/file}{yes}{no}}

That seems like it would work.

Am I missing anything?


On Tue, 27 Feb 2001, Philip Hazel wrote:

> On Mon, 26 Feb 2001, Dave C. wrote:
>
> > I can call exim -bP host_accept_relay to get the value of that setting,
> > but is there any way to do the same check that exim does when it is
> > relaying, and just come up with a yes or no?
>
> host_accept_relay = lsearch;/some/file     (say)

>
> Then
>
> exim -be '${lookup{$domain}lsearch{/some/file}{yes}{no}}'
>
> or something along those lines. That is, put your relay domains in some
> kind of lookup, and then you can use -be to replicate the lookup.
>
> This is not a general solution, of course. If your host_accept_relay
> contains wildcards and/or negations it won't work.
>
>


--