Loading

SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) Alignment Fails in Salesforce Email Delivery

Udgivelsesdato: Oct 9, 2026
Beskrivelse

To avoid email spoofing, Salesforce encourages customers to include the Salesforce Sender Policy Framework (SPF) record in their domain's SPF record and to implement DomainKeys Identified Mail (DKIM) so that Salesforce signs outbound emails sent on the company's behalf.

If the email domain has a Domain-based Message Authentication, Reporting & Conformance (DMARC) policy, either SPF or DKIM must pass and be in alignment, as defined by DMARC. This article explains the root causes of SPF and DKIM alignment failures in Salesforce email delivery.

To confirm whether an alignment issue exists, use a web-based header analyzer such as the Message Header Analyzer tool.

Løsning

SPF and DKIM alignment failures in Salesforce email delivery are resolved by setting up a DKIM key, or, if that is not possible, by setting up SPF and disabling Bounce Management and Email Security Compliance. The sections below explain the causes and the steps.

Why SPF Alignment Fails in Salesforce

SPF alignment fails when Bounce Management, Email Security Compliance, or both settings are enabled. If either setting is enabled in your organization, the envelope sender address changes to a Variable Envelope Return Path (VERP) address such as "sampleemail=salesforce.com__abc123@abc123.bnc.salesforce.com". This does not meet the DMARC alignment requirement because the Envelope Sender does not match the domain in the From header.

As long as DKIM signing passes in alignment, DMARC does not require SPF to also be aligned. For customers who want to continue using Bounce Processing, Salesforce recommends setting up DKIM.

Note: Leaving Bounce Management active in Salesforce does not ensure successful email delivery because of the mismatch between the Envelope Sender and the From header. Emails can be rejected or sent to spam folders depending on the recipient's email server policies.

Why DKIM Alignment Fails in Salesforce

DKIM alignment fails when the Domain field in the DKIM key does not match the domain in the From header.

Preferred Resolution: Set Up a DKIM Key

Set up a DKIM key in Salesforce. The contents of the Domain field must match the Domain Match Pattern field.

Alternate Resolution: Set Up SPF and Disable Bounce Management

If you cannot set up a DKIM key, Salesforce recommends the following alternate solution:

  • Set up SPF in your domain's SPF record, and
  • Disable both Bounce Management and Email Security Compliance in Salesforce Classic and Lightning Experience.

Disable Bounce Management and Email Security Compliance in Lightning Experience

  1. From Setup, enter Email in the Quick Find box, then select Deliverability.
  2. Deselect the checkboxes for Activate bounce management and Enable compliance with standard email security mechanisms.
  3. Click Save.

Disable Bounce Management and Email Security Compliance in Salesforce Classic

  1. From Setup, enter Email Administration in the Quick Find box, then select Deliverability.
  2. Deselect the checkboxes for Activate bounce management and Enable compliance with standard email security mechanisms.
  3. Click Save.
Vidensartikelnummer

000381292

 
Indlæser
Salesforce Help | Article