Re: [Exim] help on building new email architecture

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Edgar Lovecraft
Data:  
Para: exim-users
Asunto: Re: [Exim] help on building new email architecture
Rossen Naydenov wrote:
>

..[snip]...
>
> The problem is that I don't know what to do next and how to relay the
> mail to/from the central mail server.
>
> I read the exim4 FAQ's and found routers for relaying the mail to
> another server. Is it enough to just put a router like this after the
> first router for amavis:
>
> send_to_gateway:
> ~     driver = manualroute
> ~     transport = remote_smtp
> ~     route_list = * central.server.host

>
> And can I put IP address(not FQDN) in the place of
> 'central.server.host'?
>

yes, and yes (just add a 'domains = *' to the gateway router).

From the manual:

http://www.exim.org/exim-html-4.30/doc/html/spec_20.html#SECT20.4
20.4. Format of the list of hosts
A list of hosts, whether obtained via route_data or route_list, is always
separately expanded before use. If the expansion fails, the router
declines. The result of the expansion must be a colon-separated list of
names and/or IP addresses. IP addresses are not enclosed in brackets.

and

http://www.exim.org/exim-html-4.30/doc/html/spec_20.html#SECT20.7
The manualroute router can be used to forward all external mail to a smart
host. If you have set up, in the main part of the configuration, a named
domain list that contains your local domains, for example,
  domainlist local_domains = my.domain.example
you can arrange for all other domains to be routed to a smart host by
making your first router something like this:
  smart_route:
    driver = manualroute
    domains = !+local_domains
    transport = remote_smtp
    route_list = * smarthost.ref.example
This causes all non-local addresses to be sent to the single host
smarthost.ref.example. If a colon-separated list of smart hosts is given,
they are tried in order (but you can use hosts_randomize to vary the order
each time). Another way of configuring the same thing is this:
  smart_route:
    driver = manualroute
    transport = remote_smtp
    route_list = !+local_domains  smarthost.ref.example
There is no difference in behaviour between these two routers as they
stand. However, they behave differently if no_more is added to them. In the
first example, the router is skipped if the domain does not match the
domains precondition; the following router is always tried. If the router
runs, it always matches the domain and so can never decline. Therefore,
no_more would have no effect. In the second case, the router is never
skipped; it always runs. However, if it doesn't match the domain, it
declines. In this case no_more would prevent subsequent routers from
running.
--


--EAL--