This instructional article will demonstrate the Odoo configuration process of Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM) Signatures to ensure Odoo passes the DMARC alignment check and eliminates spam from your domain and increases security.
The SPF record identifies the mail servers and domains that are allowed to send email on behalf of your domain. The DKIM record, on the other hand, is a specially formatted DNS TXT record that stores the public key the receiving mail server will use to verify a message’s signature. These email authentication methods will be used to prove to ISPs and mail services that senders are truly authorized to send email from a particular domain and are a way of verifying your email-sending server is sending emails through your domain.
The process of configuring SPF
In order to authenticate Odoo on SPF, please follow these steps:
- Head to your DNS zone
- Create a new TXT record
- Input the DNS name as @ or your domain name
- Input the DNS value as v=spf1 include:_spf.odoo.com ~all
- Save the record
- Wait up to 72 hours to allow your DNS to process the changes
The screenshot below will show you an example of the SPF record. We’ll be using CloudFlare for this example.
Important Note: Each domain must have only one SPF TXT Record. If you have multiple SPF Records, SPF will return a PermError.
If you are using multiple IPs, ESPs, Third-Party services for your various email strategies, you should include them in a single SPF Record.
E.g v=spf1 ip4:18.57.156.221 include:_spf.odoo.com include:thirdpartyservice.com ~all
The process of configuring DKIM
To enable DKIM for Odoo on your domain, please follow the steps below:
- Head to your DNS zone
- Create a CNAME record
- Input the DNS name odoo._domainkey
- Input the DNS target or value: odoo._domainkey.odoo.com
- Save the record
Screenshot below will show you the example of the DKIM record. We’ll be using CloudFlare for this example.
Important Note: Please note that if you are using a CDN such as Cloudflare, you need to disable the Proxy Status and set it as DNS only.
The process of configuring the Return-Path domain
In order to configure the SPF alignment and let the emails pass on SPF check with no issues, please follow the steps below:
- Head to your Odoo Portal
- Head to Setting > Discuss
- In the Alias Domain section, write your domain name instead of the default domain
- Save the changes
Congratulations, you now successfully authenticated your outgoing mail stream from Odoo with SPF and DKIM.