Re: [Exim] Falling Back

Top Page
Delete this message
Reply to this message
Author: bhoc
Date:  
To: exim-users
Subject: Re: [Exim] Falling Back
on Mon, 7 Jan 2002 09:54:17 +0000 (GMT), Philip Hazel wrote:

> If you can arrange, for example, for some file to exist when the link is
> up and not when the link is down (or vice versa), you could use this to
> switch between two different transports, one with fallback_hosts set and
> the other without. In your router you'd put something like this:
>
> transport = ${if exists{/some/file}{remote_smtp1}{remote_smtp2}}


I tried it and yes, it works. Sort of. As a fact of life, the DNS is
sitting on the same box as exim, so if the link goes down, bind cannot
resolve, so the lookuphost router will refuse to receive the message as
the recipient cannot be verified.
I solved it slightly differently (explained just for the benefit of the
community):
My transport section looks like this:

(...)
# check for unwelcome recipients to bounce them right on the doorstep
badusers:
driver = domainlist
domains = ourdomain1.com:ourdomain2.org
local_parts = lsearch;/etc/exim/badusers.${domain}
route_list = * localhost byname
self = local
verify_only

# now check if the mail is inbound, so we can forward it to lotus notes:
# the local_smtp transport renames potentially dangerous attachments
localdomains:
  driver = domainlist
  transport = local_smtp
  route_list = ourdomain1.com notes1:notes2 byname; \
               ourdomain2.org notes2:notes1 byname


# if the mail is outbound, see if the link is up, so lookuphost can check
the name
# some external whizzo will take care of the /var/run/link_up file
lookuphost:
driver = lookuphost
domains = ${if exists{/var/run/link_up}{*}{}}
transport = remote_smtp

# if the above failed, send everything to one of the smarthosts. Not our
problem any more...
fallback:
driver = domainlist
transport = remote_smtp
route_list = * my.smarthost1:my.smarthost2 byname
(...)

Now try *that* with M$ Exchange... hehe.

Mit freundlichen Grüssen
With Kind Regards

Benedikt Hochstrasser

Penta Group AG
Ifangstrasse 6
8952 Schlieren
Tel: 01 738 90 50
Fax: 01 738 90 55
Mobile: 079 324 20 80
bhoc@???
www.pentagroup.ch
Private: bhoc@???