MX Records for internal IPFIRE DNS Server

Hello!
I would like to add static MX Records for the Intranet / VPN to my ipfire setup.
How can I do this?
In the UI I can setup DNS-Records, but I would like to setup MX-Records for my local Mailserver as well.
Is this possible?
best regards

Patrick

Hi Patrick,

sorry for the late reply.

No, unfortunately, the GUI only supports A (IPv4) records at the time of writing. To my knowledge, it was not intended to replace a full-qualified nameserver. :slight_smile:

Thanks, and best regards,
Peter Müller

Hi Peter!
Is there a way in the shell to do this?
As the firewall has a DHCP and many other non firewall related things integrated, it would be cool if I could setup mx records at least for the vpn.
best regards

Patrick

Hi,

yes, you could place a Unbound configuration snippet within /etc/unbound/local.d/ (please have a look at /etc/unbound/hosts.conf or the Unbound documentation on how to write those files) and reload it by running /etc/init.d/unbound reload.

In contrast to /etc/unbound/hosts.conf, a file within the local.d directory survives modifications made in the hosts GUI.

Thanks, and best regards,
Peter Müller

thank you very much :slight_smile:

Hi,

for the records, I will mark this thread as being solved then, although the “solution” is rather hacky. In case anybody is willing to improve that CGI (more information on IPFire development is available here), patches are welcome. :slight_smile:

Thanks, and best regards,
Peter Müller

Hi Patrick,
do you have managed this?

I try to add a MX record to /etc/unbound/local.d/hosts.conf like this:
local-data: "intern. 1800 IN MX 10 mail1.intern."
or:
local-data: "intern. IN MX 10 mail1.intern."

But if I check the syntax with unbound-checkconf it throws an syntax error.

A hint how you were successful is welcome.

Bernd

Hi Benny :wink:
Yes it works like charm.
Try this:

server:
local-data: "mail.yourdomain.com. IN A YourIPOfMailServer"
local-data: "mail.yourdomain.com. IN MX 10 YourIPOfMailServer"

best regards

Patrick

1 Like

Hi Patrik,

thank you for the detailed description!