DNS not resolving for Postfix

2 posts / 0 new
Last post
#1 Tue, 11/14/2017 - 03:03
inferKNOX

DNS not resolving for Postfix

Hi,

I'm trying to do the following: * have a website and nameservers running on a hosted VPS * run VirtualMin on a private email server in an office LAN with the MX from the VPS pointing to mail.domain.com and mail.domain.com pointing to my WAN IP, then the router port forwarding to the server.

I have simply * installed Webmin, then VirtualMin on the (CentOS7) server, * installed DoveCot & Postfix, * made the virtual servers and mailboxes for them, * disabled BIND DNS, as well as apache for the virtual servers in VirtualMin, * set the server's name to the mail.domain.com in Webmin > Network Config > Hostname & DNS Client

Now I'm getting the following error when trying to send mail (from /var/log/maillog): Nov 14 08:49:15 mail postfix/error[19716]: 6E64B6138728: to=user@anotherdomain.com, relay=none, delay=54890, delays=54890/0.18/0/0.04, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=anotherdomain.com type=MX: Host not found, try again)

Please help me. I'm a complete novice and need explicit direction.

Tue, 11/14/2017 - 04:23
inferKNOX

I think I found the issue.

Despite my having set DNS server IPs in Webmin > Network Config > Hostname & DNS clients, it was not setting what I entered (to /etc/resolv.conf). Instead it was putting some ipv6 address.

I manually set the nameservers in resolv.conf with the router IP, secondly IPS DNS server IP and thirdly Google DNS server IP (8.8.8.8), reloaded Postfix, and it seems like it's working at last.

Topic locked