Results 1 to 4 of 4

Thread: [SOLVED] How do I clear Zimbra's/postfix's dns cache?

  1. #1
    Join Date
    Apr 2008
    Posts
    69
    Rep Power
    7

    Exclamation [SOLVED] How do I clear Zimbra's/postfix's dns cache?

    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):
    Code:
    Jul 21 16:20:07 power postfix/lmtp[11504]: connect to mail.example.com[1.2.3.4]: Connection refused (port 7025)
    Jul 21 16:20:07 power postfix/lmtp[11504]: 9285E1170037: to=<user@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[1.2.3.4]: Connection refused)
    where 1.2.3.4 is the public IP address, instead of the internal IP.

    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:
    `rndc flush`

    and flush the system cache
    `/etc/init.d/nscd restart`

    and now pinging the hostname resolves back to the internal IP, 192.168.x.x. I stopped and started Zimbra:
    `su - zimbra`
    `zmcontrol stop`
    `zmcontrol start`

    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?

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Code:
    cat /etc/hosts
    cat /etc/resolv.conf
    dig _domainname_ mx
    dig _domainname_ any
    host `hostname` <- note backticks and not double quotes
    has anything else changed on your server at all ? any updates applied ?

  3. #3
    Join Date
    Apr 2008
    Posts
    69
    Rep Power
    7

    Smile

    D'oh! Fixed. Thanks for the incredibly fast reply!

    Quote Originally Posted by uxbod View Post
    Code:
    cat /etc/resolv.conf
    When the ISP connection went down, I was doing all sorts of tests to make sure the problem wasn't on my side, which included testing to make sure that there was no DNS problem on the local DNS, so I inserted the nameserver of the ISP in resolv.conf and forgot to remove it. Removing it solved the issue.

    Thanks again!
    Last edited by frankman; 07-21-2008 at 02:15 AM. Reason: fixed a sentence.

  4. #4
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Tee hee Glad all is working fine now

Similar Threads

  1. can't you help me
    By iwan siahaan in forum Administrators
    Replies: 6
    Last Post: 12-17-2007, 05:53 PM
  2. :( DNS Lookup issues
    By jhgutierrezg in forum Administrators
    Replies: 3
    Last Post: 05-30-2007, 08:00 AM
  3. ZCS ROCKS! Need some DNS help!
    By SiteDiscovery in forum Administrators
    Replies: 9
    Last Post: 12-30-2006, 09:50 PM
  4. DNS in a nutshell part two (For dummies)
    By daimer77 in forum Installation
    Replies: 4
    Last Post: 12-18-2006, 05:28 PM
  5. DNS Strategies and Best Practices, and a SLES10 Request
    By LMStone in forum Administrators
    Replies: 4
    Last Post: 10-14-2006, 07:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •