Open
Description
We currently use ImprovMX to handle mail sent to @nixos.org
(see relevant dns entries).
- We only use ImprovMX for mail forwarding (teams like
infra@
,marketing@
, etc). Today, nobody sends mail from@nixos.org
, and nobody has any inboxes. - You need a web account with ImprovMX to see and to update these mail forwards. The Nix community can't see/audit any of this.
- There are various limits (number of forwards, perhaps the number of emails an address can forward to?). See https://improvmx.com/pricing/. I don't know if we're currently paying for ImprovMX. I think I heard that we've run into some of these limits.
The plan
A few weeks ago, @Mic92 asked me to look into self hosting this instead. He recommended Simple NixOS Mailserver (SNM). I've played with it a bit, and it does seem like a good fit here.
- Install SNM on umbriel.
- The configuration docs here are great: https://nixos-mailserver.readthedocs.io/en/latest/setup-guide.html.
- Leave
mailserver.loginAccounts
empty, and disable pop/imap. - Port the existing mailing lists from ImprovMX to
mailserver.forwards
- @Mic92 has posted a dump [REMOVED] (accurate as of 2024-09-30).
- Verify this server can successfully send mail (target: 10/10 on https://www.mail-tester.com/). Either by temporarily adding a login account, or speaking directly to postfix via the cli.
- Monitor smtp tls (see below).
- Alert on stmp tls monitor failures.
- Make it possible to send emails as
nixos.org
(start replacingmail-test.nixos.org
withnixos.org
). - Talk to t-online and outlook to tell them we exist.
- Wait until the Nix Steering Committee Election is done: https://nixos.org/blog/announcements/2024/sc-election-2024/.
- Rollout the change (ETA: early March 2025)
- Check that
listsWithSecretFiles
is up to date - Switchover the MX records from ImprovMX to
umbriel.nixos.org
. - After the MX record change has propagated everywhere (check with https://www.whatsmydns.net/), verify that email forwards still work. If not, switch the MX records back.
- Cleanup: shut down our ImprovMX account, or do whatever we can to reduce confusion about this
- Check that
Notes
- Monitoring
- Ideally, the infra team would get alerted if emails have been sitting in a postfix queue for a long time. Are there any best practices for this? We use Prometheus, perhaps https://github.com/kumina/postfix_exporter is a good pick? It's packaged in nixpkgs =)
- @jfly chatted with @Mic92, and we're going to start with "blackbox" monitoring, which runs on
pluto
. Dumping some links from our discussion:- smtp_starttls cannot work well prometheus/blackbox_exporter#913
- https://github.com/prometheus/blackbox_exporter/blob/53e78c2b3535ecedfd072327885eeba2e9e51ea2/example.yml#L124
probe_ssl_earliest_cert_expiry
- https://search.nixos.org/options?channel=24.05&show=services.prometheus.exporters.blackbox.enable&from=0&size=50&sort=relevance&type=packages&query=blackbox
- http://build01.nix-community.org:9273/metrics
- Anything else?
- Backups
- Not necessary. This service is pretty much stateless (except for the mail stuck in queues, which we can live with?)
Alternatives considered
- I don't know if there's been any serious discussion about paying someone (ImprovMX or something else) to handle this for us. Since declarative management and audit-ability are important to us, it would either have to be a provider that has a Terraform provider, or we could build one ourselves.
- @Mic92, can you shed any light on this?
Metadata
Assignees
Labels
No labels
Activity