On Tue, 2015-10-27 at 15:02 -0500, j...@lexoncom.com wrote: > SO i setup the dns server. > Can i force spam assassin to use localhost for dns or I must > reconfigure > the host? > Simpler than that. Assuming your dns server is: - listening on your LAN for dns requests - is configured to be the definitive name source for hosts on your LAN, i.e. it has a zone file defining 'example.lan' as the domain name used for all hosts on the LAN - the configuration has an A and PTR record for every host on the LAN - the server's IP is 192.168.7.2 [1]
Then the following setup should work and is easy to maintain: - The server's /etc/resolve.conf should contain the lines search example.lan nameserver 192.168.7.2 That takes care of SA's dns lookups and caching needs as well as providing a centralised service for every other host on the LAN - if the other hosts on your LAN use exactly the same /etc/resolv.conf then everything 'just works' [2] [1] change to suit the IP range you're using on your LAN. My LAN's subnet is 168.192.7.255 and I'm showing my resolv.conf lines [2] you may want to add another 'nameserver' line after the initial one. This should reference some external dns, one belonging to your ISP or a public dns, so that external names still get resolved when either the dns process or the server it runs on is offline for one reason or another. This is fine for a smallish LAN with a fairly static host population. If you need something more dynamic, run a DHCP server to support visitors, etc. This is how my fairly small LAN works. It is virtually maintenance free: the only stuff I need to do is to configure any hosts when an OS upgrade manages to loose or overwrite its network configuration. Martin