Re: [exim] Using a smarthost while acting as a mail relay

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Jason Meers
Fecha:  
A: Shane
Cc: exim-users
Asunto: Re: [exim] Using a smarthost while acting as a mail relay
Shane wrote:
> Hello all,
>
> I recently configured my mail server to use my isps
> smarthost as I'm assigned with a dynamic IP via DHCP. Even
> though it hasn't changed in a long time, it's considered
> dynamic by the RBLs that be. Anyways, I'm secondary MX for
> a few domains and when the primary host is down, I'm
> bouncing mail. The mail comes into my host, I forward to
> my isp and my isp sees that primary mx is down and
> redelivers back to my host. A mail loop then occurs and
> the message eventually bounces.
>
> Is there any way I can tell exim to use a smarthost except
> for domains for which I relay?
>
> Thanks,
> Shane
>

Hi Shane,
Take the example below which is a pretty standard manualroute router, in
this instance it only "handles" messages which are not for domain in the
"relay_to_domains" domainlist. I say NOT in the list becuase of the "!"
(exclamation, bang or pling depending on what you want to call it).

By using and existing domainlist with or without the "!" operator you
can decide which routers handle which messages.
(Dont forget the plus sign in front of the domainlist, its a common mistake)

my_relay_router:
driver = manualroute
domains = ! +relay_to_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
route_list = * mail19.messagelabs.com
no_more

For example to match all "local_domains" use:
domains = +local_domains

To match everything except "relay_domains" use:
domains = ! +relay_domains

You can have multiple matches by using a colon as a separator:
domains = +local_domains : ! +relay_domains

If you run into problems just check where you are using the "no_more"
option.

It's all in the official documentation on www.exim.org but here are pdf
versions of the relevant sections you need:
http://www.exim-new-users.co.uk/content/view/24/39/
http://www.exim-new-users.co.uk/content/view/65/39/
http://www.exim-new-users.co.uk/content/view/40/39/

Thanks
Jason_Meers
--
www.exim-new-users.co.uk