mailcow's Generic-OIDC identity provider can sign mailboxes in to its UI and SOGo with Pocket ID. mailcow isn't NixOS, so its side is set up by hand in the admin UI with the secret from `mailcow/oidc-secret.txt`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.7 KiB
2.7 KiB
A Debian VM running mailcow (mail.nul.ie) — the
mail server for nul.ie. Declared in colony's my.vms.instances but not
a NixOS system: everything inside the VM is configured out of band.
- Source (host-side only): the
mailinstance innixos/boxes/colony/vms/default.nixand the90-vm-mailnetwork innixos/boxes/colony/default.nix - Host: VM on
colony - nixpkgs: not applicable (Debian guest; host-side definition uses
colony'smine-stable)
Role
- Runs the full mailcow stack (Postfix/Dovecot/SOGo/Rspamd) for
nul.ie. Other colony services send through it asmail.nul.ie(e.g. Gitea, and the disabled Mastodon config). rootanddataLVM disks; thevm-mail-dataLV is included incolony'sborgthinbackups.
Network assignments
This guest is not a NixOS system, so its host-routed addresses are not rows in the generated network assignments table.
Link and addressing
The VM attaches to a dedicated, unbridged TAP (vm-mail). colony puts the point-to-point
custRouting.mail-vm address on the host side, link-routes public
94.142.241.227/32 down the TAP, and advertises 2a0e:97c0:4d2:2000::/64 with RAs.
- DNS:
mail-vm.ams1.int.nul.ie(andmail.nul.iepublicly, incl. the PTR in estuary's reverse zone).estuaryaccepts traffic to the customer prefixes without per-port filtering;colonyforwards it on ("trust for now").
Sign-in with Pocket ID
mailcow's Generic-OIDC identity provider signs mailboxes in to the mailcow UI and SOGo with
Pocket ID on middleman.
- The
mailcowclient is declared inmiddleman'sauth.nix; its secretmailcow/oidc-secret.txtis only deployed there. On the mailcow side the provider is set up by hand under System → Configuration → Access → Identity Provider, with that secret pasted in. - Only mailboxes whose auth source is the identity provider use it. IMAP, SMTP and the DAV and ActiveSync clients can't follow a redirect, so those mailboxes use mailcow app passwords there.
- Admin and domain-admin logins are unaffected.
Notes
- ACME certificates are issued on
middlemanand pushed to the VM over SSH (acme@mail.nul.ie mailcow-ssl-reload, keymiddleman/mailcow-ssh.key); the VM's SSH host key is pinned at.keys/mail-vm-host.pub.
Notable config files
nixos/boxes/colony/vms/default.nix— VM definition.nixos/boxes/colony/default.nix— host-side network and routing.