Re: [Exim] how to check if domain doesn't point to local hos…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: David Woodhouse
Data:  
Para: Arkadiusz Miskiewicz
CC: exim-users
Tópicos Novos: Re: [Exim] how to check if domain doesn't point to local host
Assunto: Re: [Exim] how to check if domain doesn't point to local host
On Sun, 2004-01-04 at 18:26 +0100, Arkadiusz Miskiewicz wrote:
> Hi,
>
> I have
> domainlist local_domains =      lsearch;/etc/mail/locals : \
>                                 lsearch;/etc/mail/virtuals

>
> send_to_gateway:
> driver = manualroute
> domains = ! +local_domains
> transport = remote_smtp
> route_list = * mygw.pl
> no_verify
>
> /etc/mail/virtuals is autogenerated and here is the problem that sometimes
> this file contains domain which is not hosted on local host.
>
> The question is how to add condition based on no idea what (dnsdb?) that will
> check real A and MX of that domain.


One possibility is to have a router which will route mail away for
domains which aren't really supposed to be on the local machine, before
the router which handles the virtual domains:

outgoing:
domains = !+local_domains
driver = dnslookup
transport = remote_smtp

# Get rid of those domains in /etc/mail/virtuals for which we're
# not really the primary MX.
fake_virtual:
domains = lsearch;/etc/mail/virtuals
driver = dnslookup
transport = remote_smtp
self = pass

real_virtual:
# .... whatever you had before...

begin transports

remote_smtp:
driver = smtp
hosts = mygw.pl
hosts_override

--
dwmw2