Flush or delete DNSCache with Zimbra

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
milauria
Advanced member
Advanced member
Posts: 96
Joined: Mon Aug 15, 2016 12:32 pm

Flush or delete DNSCache with Zimbra

Post 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
User avatar
jorgedlcruz
Zimbra Alumni
Zimbra Alumni
Posts: 2782
Joined: Thu May 22, 2014 4:47 pm

Re: Flush or delete DNSCache with Zimbra

Post by jorgedlcruz »

Hi milauria,
Here you can find more information: Best regards
Jorge de la Cruz https://jorgedelacruz.es
Systems Engineer at Veeam Software https://www.veeam.com/
milauria
Advanced member
Advanced member
Posts: 96
Joined: Mon Aug 15, 2016 12:32 pm

Re: Flush or delete DNSCache with Zimbra

Post 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
milauria
Advanced member
Advanced member
Posts: 96
Joined: Mon Aug 15, 2016 12:32 pm

Re: Flush or delete DNSCache with Zimbra

Post 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 !!
mhammett
Advanced member
Advanced member
Posts: 133
Joined: Sat Jul 19, 2014 7:07 am
ZCS/ZD Version: Release 8.6.0.GA.1153.UBUNTU14.64 U

Re: Flush or delete DNSCache with Zimbra

Post 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.
john.crombie
Posts: 5
Joined: Sat Sep 13, 2014 3:07 am
Location: AUS
ZCS/ZD Version: 8.8.15_GA_3869.RHEL7 (P7)

Re: Flush or delete DNSCache with Zimbra

Post 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
Post Reply