I have tried to get pi-hole working as a local DNS server, however I'm not aware of a way to add MX records to it. I have a local mail server on my internal network. Any thoughts or documents would be helpful. Searches didn't turn up anything.
Pi-hole uses DNSmasq
under the hood, you can use that. man page
You can create a custom config, for example /etc/dnsmasq.d/mail.conf
, and add mx-host=mail.domain,hostname.of.mailserver,preference
for each of your e-mail domains and mail servers.
Restart the DNS server (pihole restartdns
) afterwards to make the changes active.
1 Like
Daxtorim has pointed you in the right direction, but you may want to investigate if you actually need those records.
MX records main purpose is to tell mail servers where to drop mails for a certain email domain.
It's rarely necessary to provide MX records internally, especially if you would be running just one mailserver.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.