How can I put local MX record in pfSense 2.2.5 ?
I have installed a local CentOS Postfix mail server .
As DNS server in pfSense , I have chosen DNS forwarder ( dnsmaq ) .
I want to add an MX record to the advanced options but I have no idea how to write the MX record in pfSense .
In 've tried to associate DNS forwarder to a configuration file under
Advaced = > addn hosts = / etc / extra
mx- host = example.com , mail.example.com , 10
TinyDNS I never got to work and seems unstable .
I am grateful for all the help.
And what doesn't work for you?
You don't need any addn-hosts or whatever.
Then status after restart of the DNS Forwarder :
dnsmasq: read /etc/extra - 0 addresses
dnsmasq: bad address at /etc/extra line 1
dnsmasq: read /etc/hosts - 67 addresses
I have no idea what's in /etc/extra. Obviously, whatever you are putting in the advanced field MUST be a local zone. I.e., either the same domain as configured in pfSense, or you need to tell dnsmasq that the domain is local.
local=/example.com/ mx-host=example.com,mail.example.com,10 ...
The outcome is the same. I've already registered mail server under Host Overrides , so I guess it's not necessary with the line :
mail.example.com A 192.168.1.50
What outcome is the same? You test DNS with drill, dig, nslookup… (And no, A cannot replace MX record.)
Dude dok gave you the example syntax to use.. Just put it in the the advanced box for gosh sake..
Here.. I disabled resolver since that is what I use, I took exactly what dok gave you.. Started forwarder and queried for MX and there it is….
Yes whatever your mx record points to, in this example mail.example.com needs to resolve as well as A record or AAAA... But that has nothing to do with the MX record..
Thank you :). Sometimes you sweeten what is nearby.
I see the log to dnsmasq that they were recorded and through dig.
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1280 ;; QUESTION SECTION: ;example.com. IN MX ;; ANSWER SECTION: example.com. 1 IN MX 10 mail.example.com. ;; ADDITIONAL SECTION: mail.example.com. 1 IN A 192.168.1.50 ;; Query time: 2 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Sun Dec 06 19:29:18 CET 2015 ;; MSG SIZE rcvd: 86