Lorens,

Thank you for the detailed reply. I'm interested to
hear that some of the DNS smarts reside in postfix itself.

As I
had no luck with multiple records in the /etc/hosts file, I've gone to the
DNS option and setup multiple A records for exchange.xxx.local, using that
name in the Postfix's transport file. I can now see that mail is coming in
via our backup MS Exchange server, which is fine.

As long as
Postfix is smart enough to send email to the other IP address for this
record if one of the Exchange servers is down, all is well.

Thanks again,

Greg.

> On Tue, Feb 07, 2012 at
11:42:37AM +1100, Greg Wilson wrote:
>> I use this
>> technique, DNS round robin to evenly spread rdp connections to
our
>> terminal servers. My understanding is that a device does
a DNS lookup
>> and
>> the server hands out each
different IP address sequentially. Each device
>> uses (caches)
the first IP address it recieves until it's rebooted.
> 
>
That might be true for rdp connections to your terminal servers,
>
but (luckily!) it's a bit more complicated.
> 
> The DNS
server sends a reply containing all the IP
> addresses. The order
varies. If the code asking the question
> only wants one address,
then it takes only one, and the next
> time it asks the question
it might get another answer.  Postfix,
> however, understands that
there are multiple addresses and
> tries them all, one after the
other in a random order until
> one replies or until it has tried
them all and decides to wait
> before trying again. After waiting
Postfix will make another DNS
> lookup.
> 
> The
response to that lookup may be cached since the previous
> lookup,
but the cache is valid only until the record's time to
> live
(TTL) expires. The TTL is set in the DNS server. It can
> be
anything from zero ("do not cache") to a week or more. A
> common default value is 24 hours. Of course, in the case of
> a long-lived TCP connection you may have the impression that
> the IP address is used until the device is restarted, and you
> might even be correct (for an RDP client running on Windows, for
> example), but that is not the case when sending mails.
>

>> Is it possible to setup multiple transport records wth
different
>> costs to a domain? This may be a solution.
> 
> You can do unequal load balancing by creating multiple
records
> with the same IP.  That could work using /etc/hosts,
you'd have
> to test.
> 
> You can do priorities
(first try X and if it doesn't work try
> Y then Z) by using
different-priority MX records. This needs
> access to your DNS
server, and cannot be done with /etc/hosts.
> 
> Hope this
helps.
>

Reply via email to