I have a Linux ecom server that needs to be able to send email to other internal clients. This server used to have a dedicated public IP, but recently was moved behind our firewall and given a 192.168.111.x IP. We have an internal email server for all email (our ISP has created an MX record pointing all email to one of our public IP's).
Whenever the ecom server tries to send email to
user@mydomain.com, it still is resolving to the public MX record, like mail.mydomain.com, an not to the internal 192.168.111.x mail server directly. This was fine when it was not firewalled of course, but now the firewall will not allow traffic to leave the internal network and come right back in (which is by design).
If this was a windows system, I would run ipconfig /flushdns to clear all the cached DNS info. Some have said to run /etc/rc.d/init.d/nscd restart to clear the cache in Linux, but I don't a service running called "ncsd".
I have checked and rechecked all my DNS and firewall settings, and it all looks good. I have the ecom server using a single, internal DNS server on the 192.168.111.x subnet. And that DNS server has an host record for my internal email server. In fact, is I use Telnet on the ecom server to test, the email goes through...
I think this might just be a DNS cache issue, but I'm not sure....
Thanks!