I have tried with /etc/hosts but to no avail because the problem is not with the DNS service itself but with the dscache instead.
I have no ISP because I work for a big university so we have (and must use) our DNS servers.
I have not tried with dscacheutil -flushcache in the crontab, but I'm afraid that we should run it every minute because we actually have 3000 users so our mail servers can't staying there in "confusion" and waiting for the next flushcache to occur.
In case it may be of interest for someone, these are the dscache stats on our mailbox server (running ZCS 5.0.18 now):
Code:
root@mail1:~# dscacheutil -statistics
Overall Statistics:
Average Call Time - 0.001214
Cache Hits - 6830933
Cache Misses - 358593
Total External Calls - 5643716
Statistics by procedure:
Procedure Cache Hits Cache Misses External Calls
------------------ ---------- ------------ --------------
getpwnam 441528 31450 472978
getpwuid 2456920 2754 2459674
getgrnam 277617 2126 279743
getgrgid 47060 83 47143
getservbyname 712421 1893 68028
getprotobyname 101187 94 101281
getprotobynumber 598339 2672 601011
getrpcbynumber 1 1 2
getfsent 0 0 32
getnetbyaddr 28 84 112
getaddrinfo 0 0 835291
getnameinfo 499819 260595 760414
gethostbyname 794475 10987 17922
gethostbyaddr 0 84 84
gethostent 0 1 1