Beating The Spam Filters

In Configuration, Salesforce by Dan PeaperLeave a Comment

Are you frustrated by the number of bounces that you see when you send out marketing Emails?

I know I was. After hours of blood, sweat and tears creating a masterpiece only to see it disappear into oblivion and few of my recipients ever saw it. But that was in the past!

What Categorises A Message As Spam And What Can You Do?

  1. Content. There has been much written about content and the ratios of text to images and the “style” of language which I don’t intend to review here.
  2. Authentication. Is the mail server that you are using properly authenticated to send mail on your behalf? This involves setting up some technologies such as SPF, DKIM and DMARC. To set this up with Salesforce and your DNS provider follow the steps in order:-

Lets start with SPF.

This helps reduce people using your address as a forged from address.

Set this up in your DNS you need to create a TXT record.

The name should be the fully qualified name of your domain and the text part should include:

“v=spf1 mx ~all”


Save your changes and wait for a short while for the information to propagate (24hrs max). You can test your new DNS record at: “

Next, Let’s setup DKIM

In Classic Salesforce Setup, enter DKIM in the quick find box and select DKIM Keys under Email Administration.

Click Create A New Key and enter “sfmail” as the Selector, followed by your email domain and then select Exact domain only as the domain match. Click save

You will now see a Public and a Private Key. Copy the complete text of the Public Key and return to your DNS editor.

Create another TXT record as before. Enter the name as the sfmail._domainkey.yourdomain

In the text box you should enter “v=DKIM1; k=rsa; t=s; p=” and then paste your entire public key and add a semicolon. Then save the record. Note that the entry is case sensitive and that each parameter is separated by a semicolon and a space. You can check the validity of your new DNS record at: ““.

Return to Salesforce and the DKIM key record and click Activate. You should see the following message:


Essentially DMARC tells the Email systems that you are using SPF and/or DKIM and also what to do with messages that fail authentication.

In your DNS editor create a DMARC record. The name of this record is _dmarc.yourdomain


You should configure the following parameters:

In the two email fields you should enter the email address of the person you wish to receive failure reports.

Finally let’s switch it all on and test it.

In Classic Salesforce Setup enter “Deliverability” in the quick find box and open Deliverability under Email Administration. Make sure that “Enable compliance with standard email security mechanisms” and “Enable Sender ID compliance” are both checked.

Now you are ready to test your setup by sending a test email to

If you have any questions, comments or tips please leave them in the comments section below.


Leave a Comment