Repository navigation
Description
🤖 Generated by the Agentic Engineer
Summary
Complete company Email transport and move the existing mailbox safely, with ordinary mail-app access and measured delivery.
Motivation
The maintainer selected direct delivery from the company's server and asked for migration from the existing provider. Preparation of the server, administration access and encryption does not establish working inbound mail, outbound delivery or client access. Those outcomes need a distinct delivery slice under #5030.
Proposed Solution
Use the existing declarative platform and DNS owners to publish reviewed mail transport. Establish a stable sending identity, matching reverse DNS, authenticated TLS submission and receiving access before moving domain-wide mail routing. Preserve every existing mailbox and address until continuity and rollback are proved. Exact addresses, infrastructure details, credentials and message history remain in private operator configuration.
Acceptance Criteria
- Record current transport facts and ownership privately: stable sending address, forward/reverse DNS, provider SMTP permission and an actual server-side outbound SMTP connection. Preserve existing address ownership; any additional recurring cost requires its own authorization.
- Publish only the intended inbound SMTP, authenticated submission and mailbox-access endpoints through reviewed declarative configuration. Validate certificates, renewal, connectivity and client identity from an independent network.
- Reject anonymous relay and spoofed authenticated sending identities; preserve the agents' separate maintainer-only recipient restriction. Verify the relevant positive and negative controls against the deployed server.
- Apply domain routing and SPF, DKIM and DMARC through the reviewed declarative DNS owner, with a tested rollback. Do not move MX before destination delivery, recovery and existing-address inventory are verified.
- Copy and reconcile existing message history and the complete approved address inventory, proving message counts and representative content privately. Gracefully retire old aliases without deleting shared provider history.
- Configure the maintainer's normal mail apps and demonstrate authenticated sending, receiving and reading without per-client encryption identities.
- Observe an authorized external round trip with SPF, DKIM and DMARC passing and inbox placement verified; preserve sanitized evidence and private delivery details.
- Verify the published configuration after protected merge, complete the documented rollback/recovery exercise and update Company Email infrastructure and service notifications #5030 with the remaining acceptance state.
Dependencies
Part of #5030. Safe activation follows availability recovery (#5412) and the account, encryption and independent-recovery gates (#5387). The business sender (#5400) remains a separate slice and requires this deployed transport for its real delivery proof.
Alternatives Considered
A hosted SMTP relay was considered; the maintainer explicitly selected direct delivery. No relay subscription or new permanent infrastructure is authorized by this issue.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Projects
- StatusShow more project fields📥 Backlog
Activity
coderabbitai commentedon Oct 28, 2026
🔗 Related PRs
#5388 - feat(email): prepare Email credential custody and recovery [merged]
#5533 - feat(email): move active credentials and recovery to infrastructure [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
chore: agent-claim #5481 nonce=65f1416a0492b34c2bb24afbc75b4ba3
chore: agent-claim #5481 nonce=9cedb1ed87f2163ee60492c353e46eb2
chore: agent-claim #5481 nonce=e3683835ed2399320a52ab4ca068afa7
devantler commentedon Nov 2, 2026
The repaired connectivity workflow has merged in #5732, and its main validation passed. Confirmed main-only run 41431268753, first attempt at
fba2aed2a76c4bf12634b1498861dfdc562a8de1, returnedEMAIL_PROVIDER_SMTP=VERIFIED scope=hosting-node-no-message cleanup=verifiedandEMAIL_PROVIDER_CLEANUP=VERIFIED.This proves the reviewed no-message SMTP session and cleanup. It sends no email and does not establish stable sending identity, reverse DNS, mail-app setup or external delivery. Those acceptance gates remain open on this issue.
30 remaining items
devantler commentedon Nov 13, 2026
Steps 1–4 of the outbound relay are live.
7e21b6c4. Read-only checks show User/email-smtp, Policy/email-smtp-send, UserPolicyAttachment/email-smtp-send and AccessKey/email-smtp all Ready and Synced, and PushSecretemail-smtp-credentialssynced to OpenBaoinfrastructure/email/ses-smtp. Nobody read the credential.Next:
🤖 Generated with Claude Code
feat(email): publish the SES identity's DKIM records
fix(email): use SES's enum value for the MAIL FROM failure behaviour (#…
devantler commentedon Nov 13, 2026
Outbound relay progress (21:10 UTC).
74f6230f, and was released as v1.3.1. The MAIL FROM domain is now set in AWS:company-mail-domainis Ready and Synced, withbounce.devantler.techand theUSE_DEFAULT_VALUEfallback.PENDINGuntil those records are live.🤖 Generated with Claude Code
devantler commentedon Nov 13, 2026
The SES identity is verified (steps 3, 4 and 7 of the relay table are done).
9804da78. Its merge-group deploy succeeded (run 43519410419), and Kyverno admitted theaws/company-mail-sesDNSEndpoint.*.dkim.amazonses.com, plus the MAIL FROM MX and SPF onbounce.devantler.tech. The domain's own MX, SPF and DMARC records are unchanged.devantler.techidentity ineu-central-1reports DKIMSUCCESS, verificationSUCCESSand verified for sending.Set Up SES Accountworkflow is not re-run while the case is open.Next: the relay route (#6236, CI green, review requested), then adopting it in production, then the real delivery test.
🤖 Generated with Claude Code
devantler commentedon Nov 14, 2026
The relay route is on main (step 8, first half). #6236 merged as
b9aeb4edafter a green CodeRabbit review at270b86cb, and its merge-group run succeeded. Main published and signed the new setup image (run 43542373401):ghcr.io/devantler-tech/platform-private-mail-bootstrap@sha256:5794c1f16cd13441360a4c508bb72ec1aaa977132c3c7094700ef470fbe5ca93. Its setup sends every remote recipient through SES on 587, requires STARTTLS with a checked certificate, and accepts only a well-formed SES SMTP login. The native fixture proved the stored route on the real server.Remaining, in order:
infrastructure/email/ses-smtpinprivate-mail, projectsrelay-usernameandrelay-passwordinto the setup's private inputs, and replaces the egress deny with DNS plusemail-smtp.eu-central-1.amazonaws.com:587only. Production pins the image from fix(email): prepare mailbox permissions without generated roles #5669, so this also adopts fix(email): verify declared administrator role bindings #5788, feat(email): prepare version-aware configuration and recovery #5796, feat(email): prepare Stalwart 1.0.3 for single sign-on #6001 and feat(email): constrain automated company mail submission #6084. It is coordinated with Make company email sign-in, encryption and recovery declarative #5387 before it is opened.🤖 Generated with Claude Code
devantler commentedon Nov 14, 2026
Production now relays through SES (step 6 of the relay decision is done). #6252 merged as
c68df119, and its merge-group deploy succeeded. Read-only checks after the rollout:sha256:5794c1f1…in all three containers. The setup exited 0 with "Email configuration verified; recovery process stopped", so the relay route, its TLS strategy and the outbound routing were applied to the production store and read back.private-mail-relayisSecretSyncedfrom OpenBao. Nobody read the values.email-smtp.eu-central-1.amazonaws.com:587.#5387's unreleased setup changes came with this image. Under the 0.16.27 schema, the setup plan is identical to the previous image's apart from the three relay operations (compared for fresh and existing stores, with and without aliases). They take effect only when a 1.x schema is selected.
Step 7, real delivery, is still open. It needs a way to send: the server's submission and IMAP ports are not public yet, and the agents' account may only mail the maintainer. It also needs SES production access, or a verified external recipient, while the sandbox is in force. Reply threading can be observed only after the domain's MX moves from iCloud.
🤖 Generated with Claude Code
devantler commentedon Nov 15, 2026
Plan for the inbound move: receiving, mail-app access, history and MX.
Outbound already relays through SES. What remains of this issue is inbound and mail-app access. The server's setup already prepares the three listeners:
The pod still runs in the preparation recovery mode, with only the administration port open. So publishing is mostly wiring.
One decision first: how the mail ports reach the server. The shared gateway cannot carry inbound SMTP with the sender's address intact. Cilium's TCP and TLS passthrough opens a new connection from Envoy, so the server would see Envoy's address and not the sender's. Inbound SPF, DMARC alignment and abuse limits all need the real address. The options:
LoadBalancerService inprivate-mailB breaks inbound authentication, so it is out. A is the simplest working option. I ask before choosing it, because the issue requires its own authorization for any new recurring cost.
Steps (the agent does everything not marked maintainer):
mail.devantler.tech. The server leaves recovery mode with its permanent administrator, opens the three listeners and trusts PROXY only from the load balancer. Publish 25 → 1025, 587 → 1587 and 993 → 1993, and allow them in the network policy.mail.devantler.techaddress records through external-dns.- create an app-specific password for the iCloud account and store it in OpenBao at a path I will name;
- list any other addresses on the domain.
I never see either.devantler.tech's MX tomail.devantler.techthrough the DNS owner, with a rehearsed rollback back to iCloud. Announced in advance.I'll start step 2 once step 1 is answered. Steps 2–4 change no DNS or mail routing that is live today.
🤖 Generated with Claude Code
devantler commentedon Nov 15, 2026
Step 1 decided: option A. The maintainer approved mail's own Hetzner load balancer, through the coordinating interactive session. His answer to whether mail may get its own LB11, at about €6–7.50 a month before VAT, instead of the free custom setup: "Yes, add it".
This authorizes this one new recurring cost: a single LB11 for the mail server. It sends PROXY protocol, and the server trusts those headers only from that load balancer.
Step 2 starts now, and the steps that change the server will be split into small PRs. The server restart in step 2 will be announced in advance, with its expected length.
🤖 Generated with Claude Code
fix(email): compare listener PROXY trust exactly on readback
devantler commentedon Nov 16, 2026
Steps 2–4 are done: the mail server is published at
mail.devantler.tech. MX still points at iCloud, so no external mail arrives here yet.mail.devantler.techprivate-mail: public167.233.123.140and2a01:4f8:c016:43fc::1, private10.0.1.250--mail-proxy-source=10.0.1.250(one restart)10.0.1.250/32onlymail.devantler.techThe one mail stop was announced in advance: about 42 seconds, from 02:34:56 to 02:35:38 on 16 November. The encrypted volume moved nodes with only a brief transient wait, and no recovery was needed.
Checks from an outside network, sending no message:
mail.devantler.techresolves to both load-balancer addresses on 1.1.1.1 and 8.8.8.8. The certificate verifies by name on 993 (Verify return code: 0) and is valid until 13 February 2027.MAIL FROMbefore sign-in is refused:503 5.5.1 You must authenticate first.550 5.1.2 Relay not allowed.Received:header of a real message names the connecting address.Next, step 5 (maintainer, private). In OpenBao, create the secret
infrastructure/email/icloud-historywith three keys:username: the iCloud account's Apple ID email address;password: an app-specific password for that account. Create it at appleid.apple.com under Sign-In and Security → App-Specific Passwords, and name it, for example, "Email history copy";addresses: every address on the domain that iCloud receives for, separated by commas, so none is lost when MX moves.No agent reads these values. Step 6 adds the reviewed one-time import job, which reads them through an ExternalSecret, copies the history from
imap.mail.me.cominto the server and reconciles message counts per folder. iCloud keeps its copy. The app-specific password can be revoked as soon as the copy is verified.🤖 Generated with Claude Code
chore: agent-claim #5481 nonce=f36c7e774227686a44a8ea16e94dec91
chore: agent-claim #5481 nonce=d0579a99a3c692d19984a6bd151258c6