email builder wrote:
OK, distilling this conversation a little bit, can anyone comment on this:
You are darn close there... What you want is
/usr/bin/spamc -u <username> -d spa.yourdomain.com -H
And spa.yourdomain.com has two ptr records, one to 127.0.0.1 and the other to 123.45.6.789
in Bind talk that would be
spa.yourdomain.com. IN A 127.0.0.1 spa.yourdomain.com. IN A 123.45.6.789
and in tinydns
+spa.yourdomain.com:127.0.0.1:3600 +spa.yourdomain.com:123.45.6.789:3600
I'm not sure if you really need the -H, I know I don't using dnscache as my local dns server.
Why? Does dnscache randomize for you?
I haven't tested using a -d 127.0.0.1,123.45.6.789 to see if spamc will fail over to the second host if all the connections are busy on the first host. I could be wrong but I don't think it will fail over to the second host because the first host will just place it in the queue to be processed. I could very well be wrong though.
But using the DNS-based approach as you do, it *will* fail over?? Why? It seems like if spamd tries to queue up any request it gets, then it would happen to you, too. Spamd should not have any way of knowing if you used DNS to resolve it or the addresses were listed on the command line, no?
Thanks!
Hi,
Yes, if I telnet spa.yourdomain.com, then telnet spa.yourdomain.com I will connect first to one server, then the next. That how ever is not fail over, that's dns round robin. If machine one really failed, then queries to that machine would still fail (I think, haven't tested it)
How ever, if I use the syntax -d 127.0.0.1, x.x.x.x, it will always connect first to 127.0.0.1 and I believe, will only fail over to x.x.x.x if the 127.0.0.1 spamd daemon is down (different from being overloaded)
Best way to see is to try it.
Regards,
Rick
