DKIM and SPF are both free email authentication methods that your organization can use. These technologies can be quite beneficial to your company and domains in the cybersecurity industry.
What is DKIM?
DomainKeys Identified Mail is a technical standard that helps email senders and recipients defend themselves from spam, spoofing, and phishing. DKIM acts like a gatekeeper to validate the authenticity of email messages.
Each email is signed with a private key, which is verified by the recipient email server or Internet Service Provider (ISP) using a public key known as the Domain Name System (DNS) (DNS). The DNS converts domain names into IP addresses, which means it lets you use your web browser to find websites and send and receive emails. Its main task is to ensure that the email message was not altered while in route.
What is SPF?
SPF stands for Sender Policy Framework, and it's another common email authentication mechanism for email delivery and security. SPF helps domain owners prevent spoofing by allowing them to whitelist IP addresses of servers that can send email on their behalf. SPF authentication will fail if a mail server with an IP address that isn't in the list tries to send email using that domain.
How to set up DKIM in DirectAdmin?
To set up DKIM in DirectAdmin we will have to log on to the SSH shell of the server, or use the Video Display to execute the steps below:
1. Navigate to the DirectAdmin install folder:
2. Enable DKIM by running:
./directadmin set dkim 2
3. Prepare the built-in EXIM by running the following commands:
4. Log on to the DirectAdmin panel with your user account and go to the E-Mail Manager section and click on E-Mail Accounts:
5. In the upper-right corner of this window, click “Enable DKIM”:
6. DKIM will be activated, and a success message will appear:
7. Click on “DNS Management” in the “Account Manager” section.
8. In the list of DNS entries look for the newly made record, which will be named like:
[domain]._domain key and have a value that starts with: "v=DKIM1;k=rsa"
Set up SPF in DirectAdmin
While we are in the DNS management for confirming that DKIM has been correctly set up, we can also add a new TXT record that will enforce an SPF-policy. To do so follow the steps below:
1. Select “Add Record”
2. In the name field, type your domain-name followed by a trailing period (.)
3. Set the record type to TXT.
4. As the value, you can use the following example:
v=spf1 mx a -all
A good resource to help you set the SPF record to your specific wishes can be found at MxToolbox