How do I clear Zimbra's/postfix's dns cache?
I have ZCS 5.0.7-64bit on CentOS 5.2-64bit community edition running on a 192.168.x.x IP behind a firewall. I have a static public IP with port 25 forwarding to the 192.168.x.x IP and port 7025 closed from the outside.
I have an internal DNS server that resolves the hostname of the Zimbra server to 192.168.x.x.
Everything was working fine, until my ISP had some issues, and I lost internet connection for about a couple of hours. When the connection came back, the server began resolving the hostname to the public IP. All incoming and outgoing email is working, but the incoming mail was getting queued up, not delivered to the mailboxes.
I found this error (hostname, email address, and IP are masked):
where 220.127.116.11 is the public IP address, instead of the internal IP.
Jul 21 16:20:07 power postfix/lmtp: connect to mail.example.com[18.104.22.168]: Connection refused (port 7025)
Jul 21 16:20:07 power postfix/lmtp: 9285E1170037: to=<email@example.com>, relay=none, delay=0.09, delays=0.06/0.01/0.02/0, dsn=4.4.1, status=deferred (connect to mail.example.com[22.214.171.124]: Connection refused)
To quickly get those messages delivered, I opened port 7025, requeued the messages, and everything was delivered. Yay! But when I close port 7025, the incoming emails queue up again.
I've pinged the hostname on the server and it was indeed resolving to the public IP. I got the local DNS back up and flush the DNS cache:
and flush the system cache
and now pinging the hostname resolves back to the internal IP, 192.168.x.x. I stopped and started Zimbra:
`su - zimbra`
but I still get the same error message above that postfix is still resolving the hostname to the public IP.
All my nodes (Mac OS X, XP, the Zimbra/CentOS server, and even the router) are using the same internal dns server and a ping test on all resolves the server's hostname correctly to the 192.168.x.x address.
But Zimbra/postfix still keeps pointing to the public IP. I don't want to keep port 7025 open unnecessarily (it was working with that port closed). How do I fix this?