Re: [exim] Outbound Mail routing

Inizio della pagina
Delete this message
Reply to this message
Autore: Phil Pennock
Data:  
To: Robert Walker
CC: exim-users
Oggetto: Re: [exim] Outbound Mail routing
On 2012-09-05 at 10:29 +0200, Robert Walker wrote:
> So my question now is how do I go about the smarthost configuration since I
> thought I was doing it with the 3 separate routers that I supplied in my
> previous email which were either causing the emails to loop between the 2
> servers for inbound and/or not routing the outbound through mimecast.


It should be just one Router.

I am not too familiar with the cPanel setup, but loosely:

 (1) Somewhere before the first "begin" line will be a main section
     option, "domainlist local_domains = <something>"; this is very
     strong convention, but not technically required.  If there is not a
     domainlist called "local_domains" defined, then hopefully something
     equivalent has been.  Make sure that the "example.com" domain,
     which comes inbound, is listed in that


 (2) After "begin routers" and until the next "begin <something>" line,
     you get the Routers, which are tried in order.  These can vary a
     lot, but if the configuration is anything like the default sample
     configuration, then they'll first handle non-local main, then
     proceed to examine local mail in more detail.


     The default configuration uses "dnslookup" to deliver to MX, but
     you instead want something called a "smarthost" setup, to have
     Mimecast do the routing.


----------------------------8< cut here >8------------------------------
begin routers

smarthost:
driver = manualroute
domains = !+local_domains
route_data = the.server.hostname.to.receive.outbound.emails
transport = remote_smtp
no_more

# That no_more means that for all mails which passed the preconditions
# (ie, not in local_domains domainlist), if this router doesn't handle
# the address, then the routing will fail and no further Routers will
# be tried.

# As long as your own domain is in local_domains, your own domain will
# not be sent out by that Router, and whatever you have next handles
# that mail.

local_foo:
driver = accept
# whatever

# Here, _AFTER_ you've sent off-box all mails not for your domain, you
# have one or more Routers which handle all mail within the domains.
# Do not use "dnslookup" or something which uses remote_smtp, if all
# those email addresses 'live' on this box.

----------------------------8< cut here >8------------------------------

It should be that simple. Make sure that mail coming in to you is not
sent back out by you, send non-local mail out to a fixed address, then
get on with dealing with everything local in the normal way.

I expect that "staticroutes" is doing something very similar to the
smarthost, but with a bit more complexity. You do *NOT* want your _own_
domain, to be handled on this server, to be listed in that! You want
that to be handled locally.

-Phil