middleman: Add a Pocket ID client for mailcow
Build llm-agents / build (pull_request) Skipped
CI / Check, build and cache nixfiles (push) Successful in 28m43s
Update docs / update (push) Failing after 1m25s

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>
This commit was merged in pull request #15.
This commit is contained in:
jackos1998andClaude Opus 5.5 committed 2026-11-27 14:42:21 +00:00
1 parent 712fabcb62
commit 08cb5828e8
3 files changed
+35

No files matched your search

+12
View File
@@ -33,6 +33,18 @@ The VM attaches to a dedicated, unbridged TAP (`vm-mail`). `colony` puts the poi
estuary's reverse zone). `estuary` accepts traffic to the customer prefixes
without per-port filtering; `colony` forwards 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`](shill/containers/middleman.md#pocket-id).
- The `mailcow` client is declared in `middleman`'s `auth.nix`; its secret
`mailcow/oidc-secret.txt` is 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 `middleman` and pushed to the VM over SSH
@@ -17,6 +17,8 @@ in
"middleman/oauth2-proxy.env" = { };
# Client secrets shared with the boxes that run the apps
"gitea/oidc-secret.txt" = { };
# Not deployed anywhere else: mailcow isn't NixOS, so it's pasted into its admin UI
"mailcow/oidc-secret.txt" = { };
};
pocket-id = {
@@ -48,6 +50,14 @@ in
launchURL = "https://git.${pubDomain}/";
secret.file = config.age.secrets."gitea/oidc-secret.txt".path;
};
# mailcow's Generic-OIDC identity provider (`mail` VM), for mailbox sign-in
mailcow = {
name = "mailcow";
callbackURLs = [ "https://mail.${pubDomain}" "https://mail.${pubDomain}/" ];
launchURL = "https://mail.${pubDomain}/";
secret.file = config.age.secrets."mailcow/oidc-secret.txt".path;
};
};
};
};
+13
View File
@@ -0,0 +1,13 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZGY3c1ZyByOEdE
dStNQUxBS2I4OFBNdjc1ek5VQ1d3UnIxMldmQllTVlhXdjFWdkZNClRQeVNxajBO
bjBJRHRKTTJBOG1yZlV3VHFKRjVvN2ZoZjhmM3daQWQ2SjgKLT4gWDI1NTE5IDdJ
OTQ1NlNIbUJHWE9wN0J4Qi82ZVhXZTUvbE14SDR5TlErYnRyRHNPeU0KaGJIZVE1
WGt6N0NnZ0Q2TXBZRm9hOXJMSVY2Vis4TExBQnVETk1zZE53YwotPiBYMjU1MTkg
RHVZS2VKUUxSdkk4aEQ5cGV4WkFQNDFZTnBlMmRrMjdCcHRPbDlYRzFIdwpVNG5R
eHRsSGIyQnVKNE5qenlEa0cwcmw4NUpERHlnRlFYck9kckVTMVp3Ci0+IDNIKil9
cSUtZ3JlYXNlIHMpK15qdwpnMkI3MzhjMHFkUlh0QWFvUWdJR1lsSFNuVFo5QVg1
MWRXM3M5Q1hEWlAyOEoxVFR2dwotLS0gUTRlTTBuSG5vbm5Cc2wwa0JZajZoZXBP
b0tPdjFEWHh2WHN5QVFxQStVYwqJgKKXVzhl1hAzrjCjL9Ms50Opvs0OEp9K0ncS
hBKY7L8jR0mPVdZrTSlA249HW22nAYXxt419WMt9wITs3lDwiA==
-----END AGE ENCRYPTED FILE-----