Wouldn't setting the DNS server to 127.0.0.1 prevent my system from actually resolving remote hosts?
My business email server has the DNS set to the ISP given DNS servers. My Spamassassin is giving the message URIBL_BLOCKED
. The solution given here indicates that I should set the DNS server to the localhost at 127.0.0.1 and another similar solution was here.
Wouldn't that prevent my system from resolving other remote hosts? Is there anything in a basic linux (centos 7) install that would actually be able to resolve whatever remote host this system might need to reach?
EDIT: Having tried it, it kind of seems broken when I make the change (emails sent from it didn't arrive when they otherwise have), so if someone can fill me in on the missing details, I'd be very appreciative.
The implied suggestion is to run your own resolver (caching name server) and then configure your system to use that.
Just setting
/etc/resolv.conf
to localhost without running your own name server will break resolving.Both solutions that you link to suggest that for a mail server (a service that will generally be doing lots of DNS lookups), it's probably better to run your own local resolver server rather than rely on one provided by your ISP or similar (which might either be overloaded or have rate limits).
Note that they don't claim that you necessarily have a local resolver server already, but if you do install one (for instance one of unbound, bind, knot-resolver, powerdns-recursor), you would then change
resolv.conf
to point to it (if running on the same machine,nameserver 127.0.0.1
should be suitable).