Re: [EXIM] include sender_hosts_accept_relay from file?

Top Page
Delete this message
Reply to this message
Author: Ben Smithurst
Date:  
To: exim-users
Subject: Re: [EXIM] include sender_hosts_accept_relay from file?
Peter J Naylor wrote:

> sender_net_accept_relay = /opt/exim/conf/relay.nets.yes
> sender_host_accept_relay = /opt/exim/conf/relay.hosts.yes
> sender_net_reject_relay = /opt/exim/conf/relay.nets.no
> sender_host_reject_relay = /opt/exim/conf/relay.hosts.no
>
> That is, get complete control over hosts/nets the machine will relay
> for, from external flat files. It works for the *_net_* options,
> but not for the *_host_* stuff (weird - why is that?).


Because you need to specify a search method for host lists; why you
don't need to specify a search method for net lists I don't know, it
would make things more consistent.

> Can someone give me a working specifier and an acceptable format for the
> matching flat file?


the net options should just have one IP address or range per line:

127.0.0.1/32
212.228.14.13/32
192.168.0.0/16

and reference them like this in the config file:

sender_net_accept_relay = /opt/exim/conf/relay.nets.yes
sender_net_reject_relay = /opt/exim/conf/relay.nets.no

and the host list should just have one host name per line:

scientia.demon.co.uk
x.scientia.demon.co.uk
y.scientia.demon.co.uk

and reference those like this:

sender_host_accept_relay = lsearch;/opt/exim/conf/relay.hosts.yes
sender_host_reject_relay = lsearch;/opt/exim/conf/relay.hosts.no

You can also specify wildcards:

*.scientia.demon.co.uk

but I think if you do you need to use partial-lsearch instead of just
lsearch, or something like that:

sender_host_accept_relay = partial-lsearch;/opt/exim/conf/relay.hosts.yes
sender_host_reject_relay = partial-lsearch;/opt/exim/conf/relay.hosts.no

Something like that anyway.

-- 
Ben Smithurst                             http://www.scientia.demon.co.uk/
ben@???


--
*** Exim information can be found at http://www.exim.org/ ***