Repository navigation
Description
🤖 Generated by the Agentic Engineer
Design: ADR 0009, Phase 2 (devantler-tech/monorepo#4280, spike devantler-tech/monorepo#4275).
Problem
The maintainer wants self-hosted company email, including migration of an existing custom-domain mailbox from iCloud and access from normal mail apps. Private agent correspondence must never reach a public artifact. The sites could also use this platform capability for transactional mail. Spend stewardship remains disabled until its separate contract is resolved.
Proposed direction
Run a mail service on the platform as a platform capability:
- Server: a maintained, self-hostable mail server with SMTP, IMAP or JMAP and built-in DKIM, for example Stalwart. Pin it to an exact release, and check its maintenance and license first.
- Domain and migration: move the existing custom-domain mailbox from iCloud, following the maintainer's direct direction on 2026-10-24. Other addresses on that domain may be retired gracefully. Inventory them privately, preserve existing messages, verify the destination and rollback before the domain-wide MX cutover, and never delete shared iCloud history as a side effect. DNS changes go through the owning repository. Exact mailbox addresses and account details stay in private operator configuration.
- Inbound: accept mail only for the service's own addresses, and never act as an open relay. A reply from the maintainer counts only when DMARC passes for one of his own addresses.
- Outbound: direct delivery from the maintainer's server, selected explicitly on 2026-10-25. Verify outgoing port 25 is allowed, a stable public sending identity and matching reverse DNS before activation. If the provider restriction remains, prepare the exact unblock request for the maintainer to submit. Verify real inbox delivery with SPF, DKIM and DMARC passing.
- Sending limits: the agents' service account may send only to the maintainer's own addresses, enforced by the server.
- Business site email: provide a dedicated automated sender with its own credential and enforced sender identity for messages to the maintainer or clients. Sending stays server-side and delivery failures are observable. Recipient restrictions on the agents' separate account remain enforced. Password resets and announcements are application use cases; do not activate undeployed application features as a side effect.
- Credentials: generated in the cluster (for example with an ExternalSecrets password generator), stored in OpenBao, and delivered to workloads by ExternalSecrets. The agents' host gets its copy once, through a step the maintainer performs, and scripts read it from the macOS Keychain at run time. No credential is ever written to a repository, an issue or a log.
- Storage and backup: mail data is backed up like the other stateful apps. Preserve company mailbox history; bounded retention applies only to a separate agent/digest mailbox, never globally to company mail.
Acceptance criteria
-
The existing mailbox is migrated with its history preserved, other domain addresses are retired gracefully, and rollback is recorded privately.
-
The maintainer can add the mailbox to normal mail apps using verified IMAP/TLS and authenticated SMTP submission.
-
Homepage presents Stalwart with its logo in an Email section at https://platform.devantler.tech. The visible entry, administration link and successful browser navigation were verified after fix(homepage): show Stalwart with its logo under Email #5482.
-
A test message from the service reaches the maintainer's inbox, not spam, with SPF, DKIM and DMARC passing.
-
His reply is accepted, and a forged reply (DMARC fail) is rejected or marked untrusted.
-
An open-relay test fails, and the agents' account cannot send to any other address.
-
The business site's dedicated sender can deliver an authorized test with SPF, DKIM and DMARC passing; another sender identity is refused, credentials stay server-side, and failure reporting works.
-
No credential appears in git, in an issue or in a log, and the agents' scripts fetch theirs from the Keychain.
-
Mail data is in the backup set, and a restore is tested once.
-
OIDC sign-in works through the existing identity provider for the maintainer's own Email administrator account. Retain a separate administrator only where normal access and a tested recovery path demonstrate its necessity.
-
Company Email uses transparent encryption of persistent server storage, with operational keys in approved service custody and independent bootstrap recovery. Ordinary mail apps can read messages without per-client S/MIME identities. Verify safe migration, new delivery and actual backup restoration, and document what is protected and what remains visible.
-
Email credentials use the canonical infrastructure custody and Email naming. Verify migration and readback before retiring any legacy custody; preserve recovery material and history.
-
Recreating the service from reviewed declarative configuration and approved private custody restores its accounts, sign-in, sender and recipient limits, and encryption settings. A restore exercise proves data and configuration recovery.
Size
L. Preparation delivered by #5288 / #5289. Remaining slices: safe mailbox configuration and restrictions; migration, DNS and outbound delivery; client setup and the real inbox/reply/backup-restore proofs.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Projects
- StatusShow more project fields🏃🏻♂️ In Progress
Activity
chore: agent-claim #5030 nonce=d0aca0ad0552d953a7c429833ed4915b
devantler commentedon Oct 25, 2026
The maintainer has confirmed the complete custom-domain address inventory privately. The destination choice and inventory-completeness question are now resolved.
The migration will preserve receiving continuity for the retiring addresses and scope historical mail to the custom domain. The next gates remain completed backup/rollback, signed serving deployment and administration, verified direct delivery and DNS, and client acceptance.
devantler commentedon Oct 25, 2026
Browser acceptance check at 2026-10-25 10:54 UTC: I opened the canonical Platform homepage in a real browser and inspected its complete rendered service list. It contains no Stalwart tile, so there is no mail-administration link to follow from that page. The visible-tile criterion remains unmet, and successful navigation to authenticated administration remains unverified.
PR #5316 has merged at source head
699cc89b128e5f2328d149fb203792a41a075a1das8eab8a8281a54ea0770b76b22655991d19fbd006. This browser observation does not complete its deployed-version verification. Keep #5030 open with its migration, client setup, real mail/reply, sending restrictions and backup/restore acceptance criteria unchanged.devantler commentedon Oct 25, 2026
Receiving continuity is delivered by #5327, including the published signed image and an actual artifact test of both aliases, ownership refusals and preservation through replay. Post-merge evidence records the exact source and image. #5324 is complete.
This parent remains open. Serving deployment and authenticated Homepage navigation, source-history reconciliation and migration, client setup, direct public delivery, trusted replies and backup/restore acceptance are still required. Existing mail and alert coverage remains active; no domain cutover or retirement has been performed.
7 remaining items
docs(mail): describe production administration activation
[-]Self-hosted mail service for the private maintainer digest and site mail[/-][+]Company Email infrastructure and service notifications[/+]devantler commentedon Oct 27, 2026
Additional maintainer acceptance requirement: no Email secret or key may depend solely on the current host. Encryption recovery must work from a replacement computer without the original local Keychain.
Before mailbox encryption activation, require the original encrypted client identity and independently available unlocking material, then demonstrate retrieval, import and decryption independently of the original host. An encrypted file copy or an unverified sync setting alone does not satisfy this. Preserve the existing identity; generating a replacement cannot recover messages encrypted to the original key. The broader service recovery proof must also account for the credentials and keys needed to unlock its backups.
devantler commentedon Oct 27, 2026
The encryption acceptance criterion now reflects the maintainer’s clarified requirement: transparent server-storage encryption, approved operational key custody and independent bootstrap recovery. Ordinary mail clients do not require S/MIME identities. Migration, new delivery and actual restore verification remain required; the other acceptance criteria are preserved.
chore: agent-claim #5030 nonce=45250124f57d0c1abb1d6edb79058863