-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add DNS server in the bundle #303
Comments
This isn't exactly an easy or simple thing to do 😉, but a DNS server that could have a common config and be directly provisioned for mail settings by mox itself is quite a nice idea. Since I'm already self hosting mail, self hosting DNS isn't much of an additional step. |
The suggestion of including a DNS server was also raised at the last talk at FOSDEM (https://fosdem.org/2025/schedule/event/fosdem-2025-5364-mox-and-simplifying-mail-server-setup-management/), a part of which was about DNS and plans to automate DNS management. Perhaps having integration for changing DNS records is already enough? Including a DNS server is quite a bit more software/functionality/complexity to add. I would want to provide DNSSEC too. I do have some experience with that (https://github.com/mjl-/gopherwatch includes a DNS server with online DNSSEC signing!), but it's a lot of work to make it compliant and bug-free. Also, it feels like a DNS server is one level "lower" in a networking setup. I don't know if it's a good idea to combine DNS and mail/web in general. Though I can see how it can simplify many things. Secondary (and more) servers can be setup with AXFR, so that shouldn't be the hard part. |
@mjl- You have already made the brilliant decision to bundle in all the flavours of email servers, even an http server. |
If users have a domain For example, let's say the user email domain is You'll need dns records for the mx hostname:
And quite a few in different places under the email domain:
Some of these are not strictly necessary, but still good to have. I'm not completely against the idea of having a DNS server in mox at some point in the future. Especially when it signs zones and sends them off to secondaries. Then I'm less afraid of downtime. But it is a lot of work. It would help if there is already code out there that signs zones. I've used github.com/miekg/dns for handling dns requests, but only to parse requests and write responses, not for its handler. I'm not so sure that code is complete/compliant. Btw, I checked out a few mail providers about 6 weeks ago for how they handle migrations of domains to them. They typically ask you to add DNS records required for email, and take you along step by step, checking if you've done it correctly. Fastmail was interesting in that it asks if you're doing anything else with your domain, like have a website. If you answer "no", it asks you to configure their name servers for your domain, so they'll do all of the DNS serving. I'm still intrigued by the idea... |
@mjl- thanks for responding! I recently moved a bunch of domain records and from Square to Clodflare and had to set up a mail provider . Not very happy with manual copy and paste of DNS records, also for MX, nor with the cloud email provider. I ended up with AWS SES lock-in for transactional (outgoing) emails and a different email box provider for normal domain emails. I wish I knew about MOX! |
While adding a authoritive DNS server to mox is quite a leap, it might be far more possible to allow it to provision a locally hosted DNS server. Or generate the config for it. I'm thinking specifically of unbound, it is a ubuiquitous, well regarded and secure DNS server that can do authoritative DNS record hosting and DNS over TLS. It is also far easier to configure and use than BIND (+co). So I'm imagining an option where mox directly generates instructions and config fragment(s) that can be imported/included into the main unbound config, and fully provisions the domain.
Unbound also has |
Provisioning an existing dns server was the plan (and still is). I wouldn't recommend running only a single DNS server for a domain, there are usually multiple records for multiple services/hosts. If the machine is down, everything in the domain stops resolving. Top level domains are typically (always?) required to have at least two name servers. My plan is to let mox use standard DNS UPDATE and AXFR/NOTIFY for making DNS record changes and staying informed about the current state of the zone. More details at this blog post: https://www.ueber.net/who/mjl/blog/p/dnsclay-dns-update-axfr-notify-to-many-custom-dns-operator-APIs-gateway/. It should work for most DNS server software/providers. It can still be appealing to include a DNS server, and would make some things easier, but you would have to do a really good job (and then it still may be better as a separate service). |
This would make MOX the best email server! Then I can make a DNS server for mail sub-domain moxmail.mydomain.com
The text was updated successfully, but these errors were encountered: