[Exim] Re: [newbie] smarthosts found by MX

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Bernard Massot
Dátum:  
Címzett: exim-users
Tárgy: [Exim] Re: [newbie] smarthosts found by MX
On Mon, Feb 17, 2003 at 10:10:58AM +0100, Nicolas Kowalski wrote:
> I defined the following router for sending mail:
>
> smart_route:
>     driver = manualroute
>     transport = remote_smtp
>     domains = !+local_domains
>     route_list = * mailhost.imag.fr

>
>
> Several other smarthosts exist, but their addresses are only available
> through MX records.
>
> My question is: how can I use these MX records for sending mail,
> instead of this hardcoded smarthost definition ?

This should work :

smart_route:
    driver = manualroute
    transport = remote_smtp
    domains = !+local_domains
    route_data = * ${sg{${sg{${lookup dnsdb{mx=mailhost.imag.fr}\
                    {$value}fail}}{\N\d+ \N}{}}}{\N\n\N}{:}}


If you want to do load balancing, add the "hosts_randomize" option to
this router.
--
Bernard Massot