Re: redundancy on multi-homed hosts for outgoing mail



In article
<5484e201-310e-4481-955b-8cf14aa8eb84@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Michael Grant <michael.grant@xxxxxxxxx> writes:
On Mar 11, 9:26 am, "D. Stussy" <s...@xxxxxxxxxxxxxxxx> wrote:
"Michael Grant" <michael.gr...@xxxxxxxxx> wrote in message

news:0d6c72d8-8bbb-49f9-8489-fe109e9b16e4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

My server is multi-homed with two ip addresses on different
interfaces.

Is it possible to set up things so that if an outgoing network
connection fails (for example a timeout) on one interface that it
automatically retries out the other with the other source address?

Incoming mail is working on both interfaces.

I am running sendmail version 8.14.1 on freebsd 6.3.

I don't believe that's a sendmail issue - but a routing table issue within
your multi-homed host.

No I disagree. I don't think this is a routing issue.

You may not think it's a routing issue, but the TCP/IP stack in your
kernel disagrees.:-)

I might be
using the term multi-homed incorrectly. The two interfaces have
different IP addresses on them. I cannot shove packets out one
interface with the ip address of the other. The machine is not a
router and there's no routing exchange between my machine and the
network to get those packets back to me if I do.

It's as if I need to specify multiple CLIENT_OPTIONS in my .mc file,
but this doesn't work.

What I'm looking for is a way to tell sendmail to first try with one
source address and if that fails, try with a different one. This way,
if one network is down, mail still goes out.

No and no. Your kernel's routing tables decide where the packets are
shoved out. Sendmail (or any application) can choose to bind to a
specific source address, but in a normal setup, this has no bearing on
the shoving - it is determined only by the *destination* address. Which
is why binding the source address on a multi-homed host - a term that
you used correctly - typically just causes breakage.

That being said, it *is* possible on most modern OSes to set up
"policy-based routing", where decisions based on the source address can
be a policy. How to do that on your particular OS is pretty much
off-topic here though. If/when you have done that, you can come back to
sendmail and learn that it doesn't provide the ability to bind the
source address "dynamically" for a given message. However the suggestion
to use two instances with different CLIENT_OPTIONS settings should be
workable - even using FallbackMX which could handle it automatically,
but you would need that to be one-way, or you'll get an infite loop and
immediate bounce when the destination is unreachable from either
instance.

However, wouldn't it be much simpler to use two different "smart hosts",
one on each network (I would guess that you have different ISPs for
those, so this is probably already available to you)? Then you can
specify them as

define(`SMARTHOST', `[smarthost1]:[smarthost2]')

in your .mc file. No need for fancy routing setup, no need to run two
instances, and every message will be tried with smarthost1, and if not
successful, with smarthost2, on each queue run.

--Per Hedeland
per@xxxxxxxxxxxx
.



Relevant Pages

  • Re: redundancy on multi-homed hosts for outgoing mail
    ... automatically retries out the other with the other source address? ... I don't think this is a routing issue. ... The two interfaces have ... single address space with two Internet connections. ...
    (comp.mail.sendmail)
  • Re: redundancy on multi-homed hosts for outgoing mail
    ... connection fails on one interface that it ... automatically retries out the other with the other source address? ... I don't think this is a routing issue. ... The two interfaces have ...
    (comp.mail.sendmail)
  • Re: Routing Problem
    ... Subject: Routing Problem ... each with a different subnet. ... it should use the second default gateway. ... > routers configured on multiple interfaces connected to two or more ...
    (freebsd-questions)
  • Re: linux behind linksys - configuration of server
    ... > Here's the routing table: ... > be running all the time, although having it do dns is attractive). ... > If it is not possible for sendmail to get mail on a POP mailbox, ... > for any pop/smtp server on the outside. ...
    (comp.os.linux.networking)
  • Re: Two taps, one IP?
    ... either my Debian guests or Ubuntu host wrong. ... This creates two tap interfaces on the Ubuntu host, ... But each is unable to wget the ... The error message suggests some sort of routing problem, ...
    (Debian-User)