POP3 not fetching in gmail

I have some emails that work and some that don't. I can send/receive mails from https://yourdomain.com:20000 just fine. The problem is we have some accounts linked to gmail using POP3 to fetch. The error we get on gmail is,

Connection Error.
Server returned error "We were unable to locate the other domain. Please contact your other provider."

Another error I've seen is, Server returned error: "Private IP address"

The gmail POP3 errors are consistent with the certain domains and some domains work fine. All domains work fine to send/receive at https://yourdomain.com:20000.

I tried restarting, BIND DNS Server, Postfix Mail Server, and Dovecot IMAP / POP3 Server. Also tried watching the mail logs /var/log/mail.log and didn't see any obvious errors.

Status: 
Closed (fixed)

Comments

If you resolve the IP address for one of these problem domains from another system, what do you get?

The message "private IP address" suggests that the IP is in one of the private ranges, like 192.168.*.

I could not resolve ips with nslookup domain.com or dig +short domain.com So I check the name servers for the domains having the problems and found this, ns1 --> public ip ns2 --> public ip ns3 --> private ip

so I deleted ns3 from those domains. Private ip error fix! Tried fetching emails in gmail POP3 and got this one again

Connection Error.
Server returned error "We were unable to locate the other domain. Please contact your other provider."

Logged into virtualmin as root and restarted the services DNS BIND, Postfix Mail, Dovecot IMAP/POP3 Server tried fetching in gmail POP3 and it worked. This problem is resolved Thanks!