Skip to content

Add custom email domain to Azure Communication Services#884

Merged
tjementum merged 1 commit into
mainfrom
pp-1194-add-custom-email-domain
May 4, 2026
Merged

Add custom email domain to Azure Communication Services#884
tjementum merged 1 commit into
mainfrom
pp-1194-add-custom-email-domain

Conversation

@tjementum
Copy link
Copy Markdown
Member

Summary & Motivation

Switch transactional email sending from the auto-provisioned *.azurecomm.net Azure-managed sender to a brand-aligned no-reply@<custom-domain> sender on Azure Communication Services. The Azure-managed sender disqualifies the brand from DMARC alignment, sender reputation tied to the custom domain, and anti-phishing signals such as Apple Mail's OTP autofill, which requires the sender's eTLD+1 to match the bound verify-form domain.

  • Add an optional domainName parameter to cloud-infrastructure/modules/communication-services.bicep. When set, the module provisions a CustomerManaged domain alongside the existing AzureManagedDomain, creates a no-reply sender username on it, and links both domains to the communicationServices resource.
  • Promote the CustomerManaged domain to be the active sender automatically once its DNS verification status reaches Verified. Until then, the fromSenderDomain output stays on the Azure-managed fallback so transactional email keeps flowing through the verification window. The existing SENDER_EMAIL_ADDRESS=no-reply@${communicationService.outputs.fromSenderDomain} wiring on account-api and main-api picks up the new sender on the next container app revision, with no env-var or app-code change.
  • Pass the cluster's domainName parameter (already wired to the STAGING_DOMAIN_NAME and PRODUCTION_DOMAIN_NAME GitHub variables and used today for cluster ingress) into the communication-services module so the email sender matches the host the user lands on.
  • Extend the existing Show DNS Configuration step in .github/workflows/_deploy-infrastructure.yml to also surface the ACS Email custom-domain DNS records. The step uses the same gating pattern as the cluster-ingress DNS check: silent on first deploy when the resource does not exist, one line on subsequent runs once the domain is fully verified, and a list of TXT and CNAME records to add at the registrar while verification is still pending. While pending, the step also calls az communication email domain initiate-verification for each record still in NotStarted, VerificationFailed, or CancellationRequested (idempotent, required because Azure does not auto-trigger verification when DNS records appear).

Checklist

  • I have added tests, or done manual regression tests
  • I have updated the documentation, if necessary

@tjementum tjementum self-assigned this May 4, 2026
@tjementum tjementum requested a review from a team as a code owner May 4, 2026 13:06
@tjementum tjementum added Enhancement New feature or request Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment labels May 4, 2026
@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@tjementum tjementum moved this to 🏗 In Progress in Kanban board May 4, 2026
@tjementum tjementum force-pushed the pp-1194-add-custom-email-domain branch 10 times, most recently from 27d35c0 to c1d9b1a Compare May 4, 2026 16:39
@tjementum tjementum removed the Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment label May 4, 2026
@tjementum tjementum force-pushed the pp-1194-add-custom-email-domain branch from c1d9b1a to fd1ec40 Compare May 4, 2026 17:16
@tjementum tjementum merged commit a4273e4 into main May 4, 2026
5 checks passed
@tjementum tjementum deleted the pp-1194-add-custom-email-domain branch May 4, 2026 17:25
@github-project-automation github-project-automation Bot moved this from 🏗 In Progress to ✅ Done in Kanban board May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant