How to set up DMARC/DKIM/SPF for Oracle Cloud Infrastructure

Updated on 2 Nov 2026: We clarified OCI approved domains, custom return-path DNS, and SMTP setup, and corrected the DMARC policy and reporting guidance.
For Oracle Cloud Infrastructure Email Delivery, configure an Email Domain, approved senders, regional SPF, DKIM, and a DMARC TXT record. A custom return path adds SPF authentication using your own domain. With the custom return path and DKIM active, either SPF or DKIM can satisfy DMARC when its authenticated domain has DMARC alignment with the visible From domain.
Create the Email Domain first, activate DKIM, approve your senders, then configure SPF and the custom return path before DMARC monitoring and enforcement. Use the exact DNS values generated in the OCI Console because DKIM targets, return-path targets, SMTP endpoints, and approved senders depend on the selected region and tenancy.
What produces a DMARC pass
DMARC passes when at least one path passes with alignment: SPF on the custom return-path domain, or DKIM using a signing domain related to the visible From domain. Both paths should work, but one correctly aligned path is enough for a DMARC pass.
Add your domain
- Select the region: Open the OCI Console in the same region that your application will use for SMTP or HTTPS email submission. Email domains and approved senders are regional resources.
- Open Email Delivery: Go to Developer Services, Application Integration, Email Delivery, then Email Domains.
- Create the domain: Select Create Email Domain, choose a non-root compartment, and enter the exact domain or subdomain used after the @ symbol in the visible From address.
- Approve senders: Open Approved Senders and add each complete From address. After DKIM is active, you can instead create @example.com to authorize all addresses on that exact domain. Create the approval in every sending region.
- Match subdomains: Create separate Email Domain resources for exact sending subdomains. A DKIM key for mail.example.com does not sign a sender at example.com.

Create Email Domain panel for mail.example.com in OCI Email Delivery
Publish authentication records at the authoritative DNS provider for your domain; hosting the application in OCI does not require moving DNS there. Check DKIM Signing Status and custom return-path DNS status separately. Oracle's approved-sender instructions explain the individual-address and approved-domain options. Use individual approvals when the application needs only a few From addresses.
Keep the approved sender in the same region as the SMTP endpoint. A sender approved in one OCI region is not approved in another, even when the address and tenancy are identical.
Regional resource check
OCI documents '535 Authorization failed' for sender authorization problems. Check the Console region, SMTP endpoint, exact From address, and the SMTP user's IAM access to the sender compartment. A newly created sender sometimes needs a retry with backoff before it is available.
Set up SPF and a custom return path
- Add a return path: Complete the DKIM setup below first, or satisfy Oracle's alternative domain-verification prerequisite. Open the Email Domain, select Custom Return Path, then Add custom return path. Use bounce.example.com for example.com, or bounce.mail.example.com for mail.example.com.
- Generate the CNAME: Select Generate CNAME Record, copy both values exactly, publish the record at the authoritative DNS provider, then complete the OCI form.
- Publish regional SPF: For the approved-sender domain's SPF TXT record, use the include shown by OCI for the sending region. Americas uses rp.oracleemaildelivery.com, Asia/Pacific uses ap.rp.oracleemaildelivery.com, and Europe uses eu.rp.oracleemaildelivery.com.
- Merge existing senders: Add the OCI include before the existing all mechanism in that hostname's SPF record. Keep other authorized senders and the existing ~all or -all ending. Never publish a second SPF record or add TXT at the custom return-path CNAME hostname.
- Confirm alignment: Send a test and confirm that Return-Path uses the custom subdomain. With the default relaxed DMARC settings, bounce.example.com has SPF alignment with example.com. Strict aspf=s requires identical domains, so that subdomain does not qualify.

Custom return-path CNAME setup for bounce.example.com in OCI Email Delivery
SPF checks the outgoing envelope sender, not the visible From address. OCI supports one active custom return path per Email Domain. Use a separate return-path hostname for each sending region to avoid conflicting regional CNAME targets. Publish the generated DNS record within 72 hours; otherwise OCI marks the return path Failed and you must delete and recreate it. See Oracle's custom return-path requirements.
Use only the regions that send mail. The commercial-region includes below are unsuitable for government or sovereign realms; use the value for your actual OCI realm. Oracle's SPF reference lists the applicable regional values.
Approved-sender domain SPF for all OCI commercial regionsDNS
example.com. 3600 IN TXT ( "v=spf1 include:rp.oracleemaildelivery.com " "include:ap.rp.oracleemaildelivery.com " "include:eu.rp.oracleemaildelivery.com ~all" )
The quoted fragments above form one SPF value in a DNS zone file. For a single sending region, use only its corresponding include. Keep the existing mechanisms for every other authorized sender. SPF allows at most 10 DNS-querying mechanisms and modifiers during evaluation, including nested includes.
With the Console's CNAME setup, SPF queries for the custom return-path hostname follow the alias to Oracle-managed DNS. Do not add TXT or MX records at that same CNAME hostname. An SPF TXT record on example.com does not apply to bounce.example.com by inheritance. Oracle documents the CNAME and separate SPF/MX options in its Email Delivery best practices.
SPF checker
Find SPF syntax issues, lookup limits, and weak records.
?/16tests passed
Run the checker against the exact domain in the delivered Return-Path to test the SPF identity used by DMARC. Check the approved-sender domain separately for OCI's SPF validation. Fix duplicate records, invalid syntax, and lookup-limit errors before enforcement.
Set up DKIM
- Open the domain: In OCI Email Delivery, open the exact sending domain, select DKIM, then Add DKIM.
- Create the key: Select Add new DKIM, then Next. Enter a unique selector prefix such as oci-mel-202609, select Next, then Generate DKIM Record. Selectors accept up to 63 lowercase letters, digits, or dashes.
- Publish the record: For commercial OCI regions, copy the generated CNAME name and target exactly. Publish them in public DNS without adding the zone name twice, then select Add DKIM. Non-commercial realms require the DKIM TXT value supplied by OCI.
- Wait for Active: Return to the DKIM resource and wait until DKIM Signing Status changes to Active before relying on it for DMARC.
- Test the signature: Send through the regional OCI endpoint and confirm that DKIM-Signature contains the expected selector and a signing domain matching the visible From domain.

DKIM selector and generated CNAME in OCI Email Delivery
OCI associates a domain's DKIM key with approved senders on that exact domain. If mail uses a From subdomain, create the Email Domain and DKIM resource for that subdomain rather than assuming the parent key applies.
Oracle generates 2048-bit DKIM material and recommends selectors that make later rotation easy. Oracle's DKIM steps explain the 2048-bit key setup. Follow the current Console steps above when button labels differ.
Illustrative OCI DKIM CNAMEDNS
oci-mel-202609._domainkey.example.com. 3600 IN CNAME ( generated.example.com.dkim.oracleemaildelivery.com. )
The example shows the record shape only. The selector and target in the OCI Console are authoritative for the tenancy and region. A DNS provider that automatically appends example.com needs only the host portion, not the full owner name.
OCI supports two DKIM keys per Email Domain, with only one active for signing at a time, and recommends rotation every six months. Create a replacement selector and publish its record before the signing change. Retain the previous public key until delayed or retried messages no longer need it. See Oracle's current DKIM instructions.
DKIM status needs attention
- Check the owner: Query the full selector._domainkey hostname and confirm that it resolves publicly.
- Check the target: Compare every label with the CNAME value generated by OCI.
- Check record type: Use CNAME when OCI gives a CNAME. Do not convert it to TXT.
- Check DNS proxying: Publish the record as DNS only so the original CNAME remains visible.
Set up DMARC
- Choose the policy domain: Publish _dmarc.example.com for From addresses at example.com. For mail.example.com, check _dmarc.mail.example.com and the applicable parent policy before editing. Subdomain policy inheritance is separate from SPF and DKIM alignment.
- Start with monitoring: If no DMARC record exists, publish the exact p=none record below. If the domain already uses p=quarantine or p=reject, keep that stronger policy.
- Use a real mailbox: Replace dmarc@example.com with a mailbox or reporting address that can receive aggregate XML reports.
- Keep one record: Publish one DMARC TXT record at the policy hostname. Under RFC 9989, receivers discard multiple DMARC records at the same lookup name, so duplicates prevent that intended policy from being used.
- Validate both paths: Confirm SPF passes on the custom return path and DKIM passes with an aligned signing domain before policy enforcement.
Initial DMARC recordDNS
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
Use Suped's DMARC record generator when the reporting address, subdomain policy, failure options, or alignment modes need customization. Leave relaxed SPF and DKIM alignment in place unless strict mode has a documented business requirement.
DMARC reporting starts after receivers discover the record and send aggregate reports, usually daily. Reports show the source IP, message count, authentication results, and policy evaluation. If the rua mailbox is on another domain, verify that its operator publishes external reporting authorization; otherwise receivers ignore that destination. RFC 9990 defines this authorization check. Use the exact reporting address supplied by Suped when sending reports to Suped.
DMARC checker
Look up a domain's DMARC record and catch policy issues.
?/7tests passed
Run the checker against the visible From domain, such as example.com or mail.example.com. Confirm that it finds one valid applicable policy, checks parent inheritance where needed, and validates the reporting destination.
Oracle does not host the DMARC policy inside Email Delivery. The record belongs in public DNS for the From domain. Oracle's DMARC overview explains how receivers combine SPF, DKIM, and From-domain identity.
Keep an existing enforcement policy
Do not lower p=quarantine or p=reject to p=none just to add OCI. Authenticate OCI first, confirm it passes in DMARC data, then leave the existing policy in place.
Configure SMTP credentials and the regional endpoint
DNS authentication takes effect only when the application submits through the configured OCI Email Delivery region. Complete the connection setup before sending the verification message.
- Give the sending user IAM access to use email-family in the compartment containing the approved sender. Include the identity domain name in the group reference when required. See Oracle's permission setup.
- For SMTP, open the sending user's SMTP Credentials and select Generate SMTP Credentials. Save the generated username and password securely; the password is shown only once. See Oracle's credential instructions.
- Open Email Delivery, then Configuration, and copy the regional public endpoint under SMTP sending information. SMTP credentials are global; approved senders and endpoints are regional.
- Require TLS: use port 465 with implicit TLS, or port 587 with STARTTLS. Submit with the same approved address in the application's envelope MAIL FROM and visible From header. OCI applies the configured custom return path to outgoing mail.
For HTTPS submission, use OCI native authentication supported by the SDK rather than SMTP credentials. Oracle's submission authentication reference explains the protocol-specific setup. The SMTP connection reference identifies the regional endpoint and TLS settings.
Verify and troubleshoot
- Send through OCI: Use the regional SMTP endpoint or HTTPS submission path that the production application uses. A message sent by another route proves nothing about OCI.
- Inspect Return-Path: Confirm the header uses the configured custom subdomain and that Authentication-Results reports spf=pass.
- Inspect DKIM: Confirm dkim=pass, then compare the d= signing domain with the visible From domain and the s= selector with the OCI DKIM resource.
- Inspect DMARC: Confirm dmarc=pass and that header.from is the actual visible From domain. That domain can differ from the parent domain publishing an inherited DMARC policy.
- Check OCI logs: Enable Email Delivery service logs and compare accepted, relayed, bounced, suppressed, and authorization events with the application timestamp.

OCI Email Delivery DKIM and custom return-path status with an approved sender
A DNS lookup confirms publication, but a delivered message confirms the whole chain. Test with a real From address, real OCI credentials, the production region, and the custom return path.
The email tester accepts a message and returns the authentication results, visible headers, DNS findings, and delivery issues in one report. Use it after every selector rotation, return-path change, or SPF edit.
Email tester
Send a real email to this address. Suped shows a results button when the test is ready.
?/43tests passed
A message can pass DMARC with SPF failing when DKIM passes and its signing domain has alignment. That result is valid, but OCI supports custom return paths, so repairing SPF gives the domain a second working authentication path.
If both SPF and DKIM pass but DMARC fails, compare domains rather than pass labels. SPF can pass for an Oracle-owned return path without DMARC alignment, and DKIM can pass for an unrelated signing domain. Authentication success does not guarantee inbox placement; recipient filtering also considers reputation and message content.
|
|
|
|---|---|---|
535 authorization failed | Sender approval, IAM access, or region | Check sender coverage and the SMTP user's compartment policy |
535 authentication credentials invalid | Incorrect SMTP credentials | Use the generated SMTP username and password |
SPF permerror | Record syntax | Merge records and count lookups |
DKIM pending | CNAME mismatch | Copy the OCI values again |
DMARC fail | Domain mismatch | Compare From, Return-Path, and d= |
No delivery | Suppression or relay | Review OCI service logs |
Fast diagnosis after sending an OCI test message
Match the complete error text to Oracle's troubleshooting reference before changing DNS. SMTP authentication and sender authorization failures happen before receiver-side SPF, DKIM, or DMARC evaluation.
Monitor OCI authentication and delivery failures
- Collect reports: Send DMARC aggregate data to a reporting system that parses XML and groups results by source.
- Set failure alerts: Alert on new sources, a falling DMARC pass rate, missing reports, DKIM failures, SPF errors, and unexpected policy changes.
- Watch DNS health: Detect removed CNAMEs, duplicate SPF or DMARC records, lookup-limit failures, and selector changes.
- Track reputation: Include blocklist (blacklist) monitoring for sending domains and IPs alongside authentication checks. OCI manages its sending infrastructure; investigate a shared-IP listing with Oracle rather than replacing DNS authentication records.
OCI service logs show submission and relay events, but they do not replace receiver-side DMARC reporting. Suped is our DMARC reporting and email authentication platform. Its DMARC monitoring groups aggregate reports by source so you can check OCI authentication before changing policy.
OCI operational visibility
- Submission events: See accepted and rejected application submissions.
- Relay events: Trace delivery handoff and bounce results.
- Resource state: Check approved senders and DKIM status.
- Suppression state: Find recipients blocked by OCI suppression.
Suped authentication visibility
- Receiver results: See DMARC outcomes reported by receivers.
- Source detection: Separate approved OCI traffic from unknown mail.
- Actionable alerts: Get a cause and concrete fix steps.
- Unified health: Review DMARC, SPF, DKIM, and reputation together.
Set DNS alerts for removed DKIM or return-path records, and use DMARC reports to investigate unfamiliar selectors or sources. Aggregate reports usually arrive daily, so alerts based on them are delayed. Use OCI logs for immediate submission and relay failures, and route both types of alert to the people who can change OCI and DNS.
Keep OCI logs for message-level investigation and use Suped for domain-level authentication trends. The two data sets answer different questions and make incident diagnosis faster when a change breaks only one region or one sending subdomain.
Secure your domain with p=reject
- Inventory every source: Classify all DMARC sources as authorized, obsolete, forwarded, or unauthorized. Resolve failures for every legitimate source, including low-volume applications, before enforcement.
- Fix OCI first: Require active DKIM, a working custom return path, sender approval in every active region, and consistent DMARC passes in receiver reports. Include forwarded messages in testing; forwarding often breaks SPF, so preserve valid DKIM signatures.
- Stage quarantine: Move a monitored domain to p=quarantine, watch authentication and delivery, and repair any legitimate source affected by the policy.
- Move to reject: Publish p=reject after all authorized sources pass consistently and alert ownership is clear.
- Maintain controls: Monitor new sources, rotate DKIM with overlap, review SPF authorization, and test after every regional or DNS change.
Review the organizational-domain policy and any explicit sending-subdomain policies before enforcement. The sp= tag controls existing subdomains that inherit the parent policy; without sp=, they inherit p=. Keep valid DKIM signatures on mail sent under p=reject, as required by RFC 9989, because SPF alone is unreliable through forwarding.
Suped's Hosted DMARC supports policy staging without repeated direct DNS edits. Its issue detection and source verification show what still needs repair before quarantine or reject.
Quarantine stageDNS
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"
Keep quarantine long enough to cover normal sending cycles, low-frequency applications, regional failover, and scheduled notifications. A calendar duration alone is not a readiness test. Receiver data must show that legitimate traffic passes.
When legitimate OCI traffic stays authenticated and unknown traffic is the remaining failure source, replace quarantine with reject. Keep the reporting address active so later breakage remains visible.
Reject policyDNS
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
Keep Suped's authentication alerts enabled after p=reject. A deleted DKIM CNAME, new region, or unapproved From address can cause a production delivery incident. Use OCI logs to catch failures before the next aggregate reports arrive.
Do not add strict adkim or aspf modes during the same change as p=reject. Make one policy change at a time, confirm its effect in receiver reports, then decide whether strict alignment has a real operational benefit.
Ready for reject
- Known sources: Every legitimate source has an owner and authentication path.
- Stable OCI results: All active regions show valid DKIM signatures and consistent DMARC passes.
- Working alerts: Authentication failures reach an accountable operator.
- Tested policy: Quarantine produced no unexplained legitimate loss.
Frequently asked questions
Yes. Configure a custom return-path subdomain beneath the Email Domain using the generated CNAME. For example, bounce.example.com has SPF alignment with a From address at example.com under default relaxed settings. Strict aspf=s requires identical domains. OCI supports one active custom return path per Email Domain.
Yes. DMARC passes when aligned DKIM passes even if SPF fails. Fix OCI's custom return path anyway because two working authentication paths reduce delivery risk.
Oracle Cloud Infrastructure Email Delivery uses rp.oracleemaildelivery.com for Americas SPF authorization and return-path infrastructure. Commercial Asia/Pacific and Europe use ap.rp.oracleemaildelivery.com and eu.rp.oracleemaildelivery.com. These are SPF include and bounce domains; a reverse-DNS hostname alone does not prove authentication.
DKIM activates after OCI can validate the published record. Timing depends on DNS caching and service checks, so a fixed 24-hour deadline is unreliable. Confirm that the full owner and target resolve publicly and match the OCI Console, then check DKIM Signing Status before sending production mail.
Every From address needs approval coverage in each sending region. Add individual addresses, or activate DKIM and create @example.com as an approved domain to cover addresses on that exact domain. Approval in one region does not authorize sending in another.
A hostname must have at most one SPF record. Merge the OCI include into the approved-sender domain's existing SPF value before all, preserving other senders. For a custom return path configured with CNAME, use that alias without adding TXT at the same hostname. SPF does not inherit from the parent domain.

