Why Zitadel email and SMS delivery needs its own hardening
A self-hosted Zitadel sends verification, invitation and password reset messages that users depend on to recover accounts and complete MFA enrollment. When those messages arrive late, land in spam, or can be forged, the sign-in flow itself becomes the weak point, even if the rest of the identity stack is well configured. Delivery trust is a property of the sending path, not of Zitadel alone. This page covers how to make that path trustworthy: replacing the default SMTP setup with a provider your organization controls, matching the sender domain to that provider, aligning SPF and DKIM so receiving mail servers can verify the sender, using webhook providers where SMTP is not the right fit, and setting code expiry in the secret generator so one-time codes do not outlive their purpose.
The default SMTP path and a customer-owned provider differ in who controls the sending domain, the credentials, the logs and the reputation of the mail stream. With a customer-owned provider, your security and messaging teams decide which domain appears in the From address, which DNS records authorize the provider to send for that domain, and how bounces and complaints are monitored. Before changing anything, confirm which SMTP settings your Zitadel version exposes in the console and configuration, who holds the provider credentials, and whether your provider supports the DNS authentication records you intend to publish. These answers shape the rest of the hardening work.
This page answers four questions for the team running the identity service: which sender configuration to use, how to verify that receiving servers will accept the messages, how to handle SMS or webhook-based delivery, and how long a one-time code should remain valid. Each decision affects account recovery and MFA, so it should be recorded with an owner and tested with real recovery flows before go-live. Check the current Zitadel documentation for the settings your release supports, since configuration names and options change between versions.
Which delivery path fits your setup
Routing all verification and reset email through your own SMTP relay is the most common starting point for workforce identity. Zitadel sends the messages, but the mail provider you configure handles delivery, so your existing mail platform, its logging and its retention rules carry over. This path suits organizations where staff already receive mail from a managed domain and the security team wants one place to review sending policy.
- Domain control: messages come from a sender address on a domain your organization already manages, which makes alignment with SPF and DKIM straightforward.
- Existing logs: bounce and delivery records sit in a system your mail team already monitors.
- Credential handling: SMTP credentials become a secret you must store, rotate and restrict to the Zitadel deployment.
- Recurring cost: the mail provider's sending volume charges continue after setup, and volume grows with user count and reset activity.
- Shared infrastructure risk: a relay used for marketing or other applications can affect your reputation for identity mail.
Before relying on this path, confirm in Zitadel's documentation which SMTP settings are supported, how TLS and authentication are configured and where sender identity is set.
For one-time codes sent by SMS, Zitadel can hand the message to an external provider through a webhook rather than sending it directly. Your own service or a messaging vendor receives the request and performs the carrier delivery. This suits customer identity, where phone numbers are a primary factor and the team wants control over routing, country coverage and sender registration.
- Provider choice: the carrier vendor, its country coverage and its sender registration rules are decided by you, not by the identity platform.
- Relay service: your webhook receiver needs its own authentication, availability and error handling, since a failed relay blocks sign-in.
- Data flow: phone numbers and one-time codes pass through an additional party, which should appear in your privacy records.
- Recurring cost: per-message charges and carrier fees recur with usage and vary by destination country.
- Testing: delivery should be tested in each country where users sign in.
Confirm the webhook payload format, signing or authentication options and retry behavior in Zitadel's documentation before designing the receiver.
A hybrid setup uses email for some messages and SMS for others, or sends through different providers by audience or region. It fits organizations that serve both employees and external customers, or that operate across jurisdictions with different carrier or mail rules. The main design work is deciding which channel handles which message type and what happens when one channel fails.
- Channel rules: define which flows use email, which use SMS and whether a fallback is allowed.
- Audience split: workforce users and customers can be routed through different sender domains and providers.
- Operational overhead: two delivery chains mean two sets of logs, alerts, credentials and contracts.
- Fallback risk: an automatic fallback to a weaker channel can reduce the assurance of a reset or verification step, so decide this explicitly.
- Ownership: name a team for each channel and its escalation path.
Check with your security and compliance leads which channels are acceptable for each message type before building routing logic.
In regulated settings the delivery path is part of the control evidence, not only an operational choice. Auditors and security reviewers usually ask where messages originate, which parties process the recipient address or phone number and how delivery failures are detected. Self-hosted delivery under your own contracts can make those answers simpler to document, though the controls must still be designed and tested.
- Processor inventory: list every provider that touches personal data in the message path.
- Contract terms: confirm data processing terms, data location and retention with each provider.
- Logging: decide what delivery metadata is retained, for how long and who can read it.
- Sender authentication: document SPF and DKIM alignment as evidence that the sending domain is controlled.
- Change control: treat provider and template changes as reviewed changes.
Confirm your framework's requirements with your assessor, since DeployOpen prepares evidence but does not issue attestations.
Configuration options and when each fits
This table compares the delivery settings you must decide on for Zitadel verification and reset messages: SMTP, sender identity, SMS or webhook providers, and code expiry. Read each row as a decision: when the option fits, what it costs you in control or effort, and what to confirm in the current Zitadel documentation before you commit.
| Setting | When it fits | Trade-off | What to confirm |
|---|---|---|---|
| SMTP host and credentials | Your organization already runs a transactional mail service or an internal relay that can send for your domain | You own credential rotation, relay allow-lists and bounce handling, and a misconfigured relay can silently drop codes | Exact SMTP settings keys, TLS mode and how credentials are stored in your deployment |
| Sender address and display name | Users need to recognize the message as coming from your brand or application, not a generic address | A sender address on a domain you do not control will fail alignment checks and may land in spam | Which sender fields are configurable per instance or per organization in your Zitadel version |
| Sender domain matching | Your login domain and mail domain are the same organization and you want messages to align with it | Matching domains improves authentication results but requires DNS work on the mail domain before go-live | How Zitadel handles sender domains for organizations with custom domains |
| SMS provider | You need phone-based verification or recovery for users who cannot receive email reliably | SMS adds per-message cost, country-specific rules and a third-party dependency in the login path | Supported SMS providers, required provider credentials and any sender ID registration rules in target countries |
| Webhook provider | You route notifications through your own messaging service, queue or a provider not built in | Your endpoint becomes part of the login path, so availability, retries and signature checks become your responsibility | Webhook payload format, signing options and retry behavior in the current documentation |
| Secret generator code expiry | Codes should expire quickly for high-risk actions and remain usable long enough for slow mail delivery | Short expiry frustrates users on delayed mail; long expiry widens the window for a leaked code | Default expiry values and the configuration keys that control verification and reset code lifetimes |
How to set up trusted message delivery
This sequence moves Zitadel's verification and reset messages from the default sender to a provider and domain you control, with authentication records that let receiving mail systems confirm the messages are genuine. Each step ends with a check you can run before moving on.
Choose the email or SMS provider
Decide which transactional provider will send Zitadel's messages, and confirm it supports custom sender domains, DKIM signing and the SMTP or webhook method you plan to use. Ask the provider for its written sending limits, bounce handling and the DNS records it requires, since these vary by vendor and plan. Record the decision with the owner who will manage the account. Done when you have written confirmation of those capabilities from the provider's documentation or sales team.
Create a dedicated sender domain
Register a sender subdomain, such as one used only for account messages, and add it to the provider's console so it can sign mail on your behalf. Keep the sender address aligned with the domain your users recognize, because mailbox providers compare the visible From domain with the domains that pass authentication. The check is that the provider shows the domain as pending verification with a set of DNS records to publish.
Publish SPF and DKIM records
Add the SPF record that authorizes the provider's sending servers and the DKIM public key the provider generated, both in your DNS zone for the sender domain. Your DNS team usually makes this change, and propagation time depends on your DNS hosting. Confirm that the SPF record contains a single include or mechanism set for your provider, because a second SPF record for the same name causes evaluation failures. The check is that the provider's console marks both records as verified.
Configure Zitadel's notification settings
In the Zitadel console, set the SMTP or webhook provider for notifications at the instance level, using the credentials and sender address from the chosen provider. Store the SMTP password or webhook secret in your secrets manager and inject it into the deployment rather than typing it into the console where it may be exposed to administrators. Set the sender address to match the verified sender domain. The check is a successful test notification from the console that arrives in your inbox with the expected sender name.
Set code expiry in the secret generator
Review the verification and one-time code settings in Zitadel's secret generator for email verification, password reset and SMS codes, and set expiry windows that match your risk tolerance and user experience. Shorter windows reduce the time an intercepted code remains usable, while longer windows generate more support requests. Confirm the values with your security owner and document them alongside the rest of your configuration. The check is that a code generated during a test login is rejected after the configured expiry.
Send test messages to several mailbox providers
Send verification and reset messages to test accounts at several large mailbox providers your users rely on, and at least one corporate mailbox that enforces its own policy. Check that each message lands in the inbox rather than spam or quarantine, and note any warnings the provider displays. Repeat the test after any change to DNS or provider settings. The check is a written test log with the mailbox provider, the folder reached and the result for each message.
Inspect headers for SPF, DKIM and alignment
For each test message, open the full message headers and confirm that SPF and DKIM both report pass, and that the domain in the DKIM signature and the envelope or return-path domain align with the visible From domain. Look for the Authentication-Results header added by the receiving server. Investigate any fail or neutral result before going live, because a single misaligned domain can push legitimate reset messages into spam. The check is that every test message passes both authentication checks with alignment, and that the results are saved with the test log.
How a verification message travels from Zitadel to the inbox
The message starts in Zitadel's notification service, which renders the verification or reset text and applies the code expiry when the one-time code is generated. It then leaves through either your own SMTP provider or a webhook provider you operate. Before the recipient's mail server accepts it, the sending domain's DNS records for SPF and DKIM must match the sender identity, so check the sender domain and DNS records first whenever messages land in spam or fail.
Verification message path from code generation to the recipient inbox.
Security risks in notification delivery
Verification and reset messages carry login codes and account recovery links, so anyone who can send, read or intercept them can take over an account. The risks below sit at different points in the delivery path: the sender domain, the code lifetime, the SMTP credentials, the provider's logs, SMS spend and the tenant boundary. Each card names the control to set and the team that should own it.
Spoofed sender domains
If the domain in the From address is not authenticated, anyone can send mail that looks like it came from your identity service, including fake reset links that lead to a phishing page. Set SPF and DKIM for the sending domain, publish a DMARC policy, and confirm the From domain matches the domain that signs the messages. The owner is the team that controls DNS for the sender domain, working with the security team that reviews phishing exposure. Check the result with a test message to several mailbox providers before go-live.
OTP codes that live too long
A one-time code that stays valid for hours gives an attacker a long window to replay a code obtained from a shared inbox, a forwarded message or a shoulder surf. Set the expiry for email and SMS codes in the Zitadel secret generator settings and align it with your login risk tolerance. Test that an expired code is rejected and that a used code cannot be reused. The owner is the identity platform team, with sign-off from the application owner whose users depend on the flow.
SMTP account credentials
The SMTP username and password, or API key for a transactional provider, let anyone who obtains them send mail as your domain. Store them in a secrets manager rather than in plain configuration files, scope the account to sending only, and rotate it on a schedule your operations team can actually run. Confirm which accounts can read the secret at runtime. The owner is the platform team that runs the deployment, with the security team approving rotation procedures.
Personal data in provider logs
Transactional email and SMS providers often keep message metadata, recipient addresses and sometimes message bodies for debugging or delivery reporting. Those logs can contain login codes and personal data, and they sit outside your infrastructure. Ask each provider for its log retention period, whether bodies are stored, where data is processed, and how deletion requests are handled. Record the answers for your privacy and data protection reviews. The owner is the privacy or compliance lead, with procurement reviewing the contract terms.
SMS toll fraud and abuse
SMS verification can be abused for toll fraud, where an attacker triggers many codes to premium-rate numbers, or simply floods a phone number with messages to run up your bill. Limit how often a code can be requested per account, per phone number and per source, and alert on unusual volume to new country codes. Review which destination countries your product really needs. The owner is the platform team that configures limits, with finance watching the monthly message spend.
Misrouted messages between organizations
In a multi-tenant setup, a message with a code or invite for one organization could reach a user in another, or use branding and sender settings from the wrong tenant. Map each organization's notification settings explicitly, test with accounts in at least two organizations, and confirm that templates and sender details resolve per tenant. The owner is the team that runs multi-tenant configuration, with the product team checking customer-facing branding.
How SPF and DKIM alignment keeps codes out of spam
SPF and DKIM are two separate checks that prove a message was authorized by the domain it claims to come from. SPF (Sender Policy Framework) is a DNS record that lists which mail servers may send for a domain, so the receiving server can compare the connecting server against that list. DKIM (DomainKeys Identified Mail) signs the message with a private key held by the sending service, and the public key published in DNS lets the receiver confirm the signature and that the content was not altered in transit. Either check can pass on its own while still failing to protect your users, because a provider can be authorized for its own domain rather than yours.
That is why alignment matters. The domain in the visible From header that users read must match the domain authenticated by SPF (the envelope sender) or the domain in the DKIM d= tag. When the authenticated domain belongs to your SMTP provider but the From address is on your company domain, receivers can treat the message as unverified, and DMARC policies may route it to spam or reject it. For Zitadel, this means the sender address configured for verification and reset emails should sit on a domain you control, with the provider's DKIM signing delegated to that domain (for example through a CNAME or a DKIM selector record you publish). Confirm the exact records with your email provider, since their setup steps differ.
Test before go-live. Send a verification code to a mailbox you control at each major receiving provider you serve, then open the full message source and read the Authentication-Results header that the receiving server added. Look for spf=pass, dkim=pass and a dmarc result, and confirm the header.d or header.from values match your sender domain. Repeat the test after any change to DNS, sending IPs or provider. Note that your own DMARC reporting and the provider's dashboards will show trends over time, so ask the provider which reports and retention they offer before you rely on them.
Limits to confirm in your environment
Notification delivery depends on limits that sit outside Zitadel's configuration: the release you run, the sending quotas of your email and SMS providers, the countries your SMS route covers, and the payload your webhook receiver must accept. Confirm each one before you test with real users, because a gap in any of them shows up as messages that never arrive.
Supported version and release notes
Confirm which Zitadel release you run and read its release notes before you change notification settings. Message templates, provider configuration and the secret generator can change between releases, so a setting that works on one version may behave differently on another. Check the release list on GitHub for the version you plan to deploy and for any later patch you need, and record the version in your change ticket so the notification test can be repeated after upgrades.
Zitadel releasesProvider sending limits
Ask your email and SMS providers for their hourly and daily sending caps, per-recipient rate limits, and what happens when you exceed them. Login bursts, such as a campaign that onboards many users on one day, can hit these caps quickly, and a throttled provider often drops messages silently from Zitadel's point of view. Compare the caps with your expected peak verification volume and plan how you will raise them before launch.
SMS coverage by country
Check, country by country, whether your SMS provider delivers one-time codes to every phone prefix your users have. Some routes block certain destinations, require registered sender IDs, or limit message length and character sets. Ask the provider for a written coverage list and for any country that needs pre-registration. Keep email as the fallback for regions where SMS is unreliable, and test with a phone from each high-volume country.
Webhook payload requirements
If you send notifications through a webhook provider, confirm the exact payload your receiver must parse, including the fields for recipient, message type, code and expiry, plus the signature or authentication headers it expects. Verify how the receiver responds to retries and timeouts, because a slow or failing endpoint can delay or duplicate a verification code. Test the full path with a staging instance so that a payload change does not break sign-in for every user at once.
Per-organization sender settings
Multi-tenant deployments need to know whether sender identity can differ by customer organization or must be set once for the whole instance. Confirm this in the current documentation and in a test organization before you promise customers their own sender domain. If sender settings are instance-wide, decide how you will handle branded mail for each tenant, such as a shared sender with tenant-specific content, and document the limitation for customer onboarding.
Questions teams ask before hiring help with email and SMS delivery
What drives the cost of securing Zitadel email and SMS delivery?
The biggest drivers are the number of sending domains, the mail or SMS provider you choose, how much DNS work is involved, and how many tenants, languages and message templates need checking. Provider setup is usually a small part of the effort; verifying that each message type passes authentication checks across the mailbox providers your users actually use takes more time. Some costs are one-time, such as the initial DNS and template work, and some recur, such as provider subscription fees, which you pay directly to the provider. Ask any partner for a quote that lists the sender domains, template count, language count, test mailboxes and whether provider fees are included or billed separately.
How long does a typical email or SMS delivery change take?
The duration depends on how many sender domains you have, how quickly your DNS changes propagate, whether your provider account is already set up, and how much testing is needed across tenants and languages. DNS changes can take time to become visible, and filtering behavior often needs several send-and-observe cycles before it settles, so the timeline is driven more by waiting and testing than by configuration. Ask for a written schedule that separates provider setup, DNS changes, template testing and a monitoring period, and confirm which steps depend on people outside your team, such as the DNS owner or the provider's support team.
What do we need to provide before the work starts?
You will need to provide three things: someone with DNS administration rights for the sending domain, an account with your chosen email or SMS provider with permission to create sending credentials, and administrator access to your self-hosted Zitadel so the SMTP or webhook settings and message templates can be changed. It also helps to have a list of the tenants, organizations and languages that send messages, plus a few test mailboxes at the providers your users use. Confirm these access paths early, because a missing DNS approval is one of the most common causes of delays.
Can our own team set up Zitadel email and SMS delivery without a partner?
Yes, a team with DNS, mail and Zitadel administration experience can make these changes, and the Zitadel self-hosting documentation covers the configuration settings involved. The parts that usually need care are aligning the sender domain with the From address, publishing SPF and DKIM records correctly, and checking that the secret generator's code expiry matches your security policy. Your team should decide whether it has the time and testing discipline to repeat checks after every provider or DNS change. A partner is most useful when the setup spans many tenants, several providers or a tight review timeline.
What happens if our verification messages still land in spam after setup?
Start by checking the message headers for SPF, DKIM and alignment results, then confirm the From domain matches the domain that signs the message. Common causes include a missing or duplicated SPF record, a DKIM key that was not published under the selector the provider uses, a sending domain that differs from the From address, or a shared provider IP with poor reputation. Fixes usually involve correcting DNS records, changing the sender configuration in Zitadel or the provider, and sending new test messages to the same mailboxes. Ask any partner whether the engagement includes a retest after changes, and what happens if the cause sits with the provider rather than your configuration.
Do SMS verification codes need the same level of setup as email?
SMS needs its own provider integration and does not use SPF or DKIM, so the setup and testing differ from email. Teams should confirm which SMS providers and destination countries they need, how the provider handles sender identifiers in each country, and whether the webhook provider path fits their architecture. Code expiry and retry limits in the secret generator still apply, and they should be checked against your own risk policy for codes sent by text message. Ask the provider which regulatory and sender registration requirements apply to your destination countries before committing to a design.
How do message templates and multiple tenants affect the work?
Each tenant or organization can carry its own branding, sender details and language variants, so the number of templates multiplies the testing effort. Each template should be checked for correct links, expiry wording, language and the sender shown to the recipient. If tenants use different sender domains, each domain needs its own DNS records and alignment checks. Ask for a template inventory as part of scoping, because it determines how much testing is needed and whether a single shared configuration is enough.
What a DeployOpen delivery engagement covers
A DeployOpen engagement for Zitadel email and SMS delivery starts with a written scope that names the work before any change is made to your environment. That scope lists the Zitadel instance and its verification and reset message templates, the SMTP relay or transactional email provider you choose, the webhook or SMS provider if you use one, the sender domain and subdomain, and the secret generator settings for code expiry. It also states what is out of scope, such as changes to the identity providers Zitadel federates with, so your team knows exactly what will and will not be touched. Deliverables and acceptance checks are agreed in the same document, so both sides can see what done means before work begins.
Configuration happens inside your own infrastructure and accounts. DeployOpen works with your platform team to set the provider credentials as secrets in your existing secret store, updates the Zitadel notification settings, and runs test sends to mailboxes you control. DNS changes such as SPF, DKIM and DMARC records are drafted for your DNS administrators to review and publish, because your team owns the zone and the change window. Each change is recorded, and test results are captured with the message headers, authentication results and timestamps your security review will ask for. Deliverability outcomes depend on your provider, your sending history and receiving mail systems, so the engagement commits to correct configuration and evidence, not to inbox placement. Confirm with your provider which authentication and bounce reporting features your plan includes before the scope is signed.
How DeployOpen scopes and delivers Zitadel notification hardening
DeployOpen treats verification and reset messages as part of the identity system, not an afterthought. The work covers the sending provider, sender domain alignment, SPF and DKIM records, webhook providers and code expiry, delivered in the client's own infrastructure and documented for their security and compliance teams.
How we scope
- Engagements are fixed-scope, with the notification channels, providers and message types agreed in writing before work starts.
- The written scope lists which Zitadel messages are covered, such as email verification, password reset and one-time codes for SMS.
- Scope also records who controls DNS, the sending provider accounts and the secret generator settings, so ownership is clear.
How we build
- We replace default SMTP with the client's chosen provider and confirm sender domain matching for every message type in scope.
- We publish and verify SPF and DKIM records, then test alignment with real messages sent to several mailbox providers.
- We configure webhook providers and code expiry in the secret generator, and test that expired and reused codes are rejected.
How we hand over
- Deliverables include a configuration record, DNS change list, provider settings and a test report with the results of each message flow.
- We document the runbook for rotating provider credentials, changing sender addresses and handling bounced or undelivered messages.
- The client's team receives a walkthrough so administrators can operate the notification setup without DeployOpen on site.
How we support
- Ongoing support and continuous testing are available as retainers, covering changes to providers, domains and Zitadel releases.
- Retests can confirm that DNS records, DKIM keys and code expiry still behave as documented after upgrades or provider changes.
- Support requests are handled against the written scope, and any new channels or providers are quoted separately from that scope.

