Page 1 of 1

Flush or delete DNSCache with Zimbra

Posted: Mon May 15, 2017 3:34 pm
by milauria
I have messed up with dnsmasq to add the split DNS configuration to my Zimbra server following the wiki https://wiki.zimbra.com/wiki/Split_DNS.
Despite the instructions I couldn't make it work initially as I was trying this on an existing Zimbra server and I had to stop dnscache service first to avoid listening port 53 conflicts

Now when starting Zimbra and the included dnscache service, the server resolves from dnscache using old entries retained in the cache instead of resolving to the newly configured dnsmasq. If I stop Zimbra dnsmasq does its job and resolves correctly.

Question is how can I flush/delete the dnscache of Zimbra so that dnsmasq can lookup the correct DNS entry ? I have been trying to reboot several times with no success...

Thx

Re: Flush or delete DNSCache with Zimbra

Posted: Mon May 15, 2017 3:45 pm
by jorgedlcruz
Hi milauria,
Here you can find more information: Best regards

Re: Flush or delete DNSCache with Zimbra

Posted: Tue May 16, 2017 12:53 am
by milauria
Hi, I considered that wiki and found useful the possibility to temporarily stop the Zimbra DNS cache service to test the issue ( /opt/zimbra/bin/zmdnscachectl stop)

Then I also realized that the status of my dnsmasq service was "dead" (systemctl status dnsmasq) ... which means was it was not resolving anything locally ... and this tells me that dnsmasq and zimbra dnscache probably must clash using the same port 53 as default (and Zimbra dnscache wins!)

Therefore my thoughts were:
a) do I really need Zimbra dnscache when using dnsmasq ? Are they not both doing DNS caching ?
b) should I leave both active and specify for dnsmasq.conf a port=somethingelsethan53 ?

Appreciate you advise, my server implementation is a small one for 5-10 mailboxes ... Thx

Re: Flush or delete DNSCache with Zimbra

Posted: Tue May 16, 2017 6:21 am
by milauria
I ended up disabling and uninstalling the Zimbra DNScache (there is thread in this forum for this) as I didn't feel like having 2 DNS caching on the same server ... that would drive me crazy for DNS troubleshooting

I may also suggest to edit the wiki page for the DNS split configuration (https://wiki.zimbra.com/wiki/Split_DNS) as it might be wise suggesting to remove the Zimbra dnscache service if using "dnsmasq" or "bind" for DNS split configuration

Many thanks for keeping this great product up to the latest developments !!

Re: Flush or delete DNSCache with Zimbra

Posted: Tue Sep 03, 2019 5:28 pm
by mhammett
jorgedlcruz wrote:Hi milauria,
Here you can find more information: Best regards

That page doesn't say anything about how to clear the cache.

Re: Flush or delete DNSCache with Zimbra

Posted: Thu May 28, 2020 3:42 am
by john.crombie
Sorry to revive stale thread, couldn't find a better answer online...

For those that come after, one way I found to do this was the following:

Code: Select all

/opt/zimbra/bin/zmdnscachectl stop
host -mx DOMAIN.COM
/opt/zimbra/bin/zmdnscachectl start
Change DOMAIN.COM to the MX records being flushed.

Note: it was only to update/flush a single MX record and I dont know if all you would really need to do would be the stop and start to empty the Zimbra dnscache