Add custom email domain to Azure Communication Services#884
Merged
Conversation
27d35c0 to
c1d9b1a
Compare
c1d9b1a to
fd1ec40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
Switch transactional email sending from the auto-provisioned
*.azurecomm.netAzure-managed sender to a brand-alignedno-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.domainNameparameter tocloud-infrastructure/modules/communication-services.bicep. When set, the module provisions aCustomerManageddomain alongside the existingAzureManagedDomain, creates ano-replysender username on it, and links both domains to thecommunicationServicesresource.CustomerManageddomain to be the active sender automatically once its DNS verification status reachesVerified. Until then, thefromSenderDomainoutput stays on the Azure-managed fallback so transactional email keeps flowing through the verification window. The existingSENDER_EMAIL_ADDRESS=no-reply@${communicationService.outputs.fromSenderDomain}wiring onaccount-apiandmain-apipicks up the new sender on the next container app revision, with no env-var or app-code change.domainNameparameter (already wired to theSTAGING_DOMAIN_NAMEandPRODUCTION_DOMAIN_NAMEGitHub variables and used today for cluster ingress) into the communication-services module so the email sender matches the host the user lands on.Show DNS Configurationstep in.github/workflows/_deploy-infrastructure.ymlto 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 callsaz communication email domain initiate-verificationfor each record still inNotStarted,VerificationFailed, orCancellationRequested(idempotent, required because Azure does not auto-trigger verification when DNS records appear).Checklist