Arno wrote:

Hi,

On Thursday 23 June 2005 11:31, Rodrigo Severo wrote:
Sam Varshavchik wrote:
The DNS server already returns DNS records in random order.
I believe that by "random order" you mean a different random order for
each query. If this is the case I would like to ask to which DNS servers
do you refer specifically?

I have two different DNS servers running in my machines that I can
promptly test: DJB's dnscache and glibc's nscd.

There's a difference between dnscaches and DNS-Servers. DNS-Caches return the same order every time (since the response is cached). But, if you query the authoritative DNS-server for the domain I'm pretty sure the order will be random. Otherwise things like round-robin-DNS wouldn't make much sense :))
The point is that Courier is supposed to talk to DNS caches not to DNS servers so I maintained Sam's use of DNS server in place of DNS cache.

But yes, you are right and I was already aware of these differences also. Thanks anyway for the clarification.

Neither one of them returns MX records in a different random order for
each query.  As far as as I can tell both of them returns consistently
the same answer until the ttl of the DNS query expires. Then they will
query again and might come up with a new answer, i.e. in a different
order, which will again persist until their ttl expires and so on.

Sam, if I understanding correctly Courier's method to choose which MX to
connect to, it would be correctly described as:

Courier tries to contact MXs in exactly the order returned by the DNS
server. Courier expects that DNS servers's answers came in a different,
random, order for each query.

If this description is right, and if my observations about dnscache and
nscd are right, which I believe all three are, we get to the final
description of how Courier is behaving in my servers:

Couriers tries to contact MXs in exactly the same order returned by DNS
servers until this DNS query expires.

As far as my logs indicate, this is exactly what's happening.

Could you please advise on how can I get a more random MX choosing by
Courier?

First you have to figure where the problem is: nscd or dnscache. If it's nscd (and from a little googling about nscd and "round robin dns" I get the impression that nscd does not have a clue about round robin), disable the caching of hosts in /etc/nscd.conf.

If it's dnscache: get rid of it and use something else as caching only nameserver.

As far as I can tell both present the same behaviour so I might have to dump both of them.

E.g. bind answers in random order, even if configured as caching-only Nameserver.

Once upon a time, a long, long time ago I used bind for a short while. Then I dumped bind. And have been much, much happier since then.

Well, now, seriously, the first intention of my previous email is certify myself that I am understaing this issue completely before making any changes.

If this behaviour is really the one expected I believe that I will really have to dump the nscd daemon that's running on my mail server. Will I have to use bind? Isn't there a lighter option available? Somehow I am inclined to believe that this isn't the expected behaviour by Sam: I mean, Courier talking to DNS caches, getting most of the times the same answer and consequently trying to contact the same MX server most of the times. I'm eager to know what Sam has to say about this.


Please let me thank you again for your help and attention,

Rodrigo


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to