Re: [exim] Setting outgoing IP address for virtual hosts

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Dave Evans
Data:  
Para: Chris Searle
CC: exim-users
Asunto: Re: [exim] Setting outgoing IP address for virtual hosts
On Mon, Nov 26, 2007 at 04:19:16PM +0100, Chris Searle wrote:
> I was thinking of a "get the IP of the MX for the domain that is sending
> the current mail - if it is this box then use it else 88.198.38.80)


Well, yeah, that's possible. But for a small number of domains, probably not
worth it :-)

> I need to read again on the semantics of the lookup call here - we're
> saying - grab the sender_address_domain from the mail, look in the file
> /etc/exim4/interfaces (lsearch) and use whatever value is found ($value)
> and if nothing is found then use the 88.x IP ?


Yup.

> Before I go in and change this - is there any easy way to test this from
> the command line with exim4 -sometestingoptions ?


To test expansion, use "-be". For example,
exim -be '${lookup{root}lsearch{/etc/passwd}}'
or whatever. Process context plays a part, of course - your lookup may work
with "-be" but not when "live" because of permissions errors, etc.

Testing a config file is usually done with "-bt" or "-bv" (for routing),
"-bhc" (for ACLs). Since you're testing neither, it's a bit more complicated.

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey