Configuring DNS for the mail server

Updated Sep 15, 2023

In order for your emails to reach users successfully, certain requirements must be met.

Spam sheets

Check if your website domain or server IP is blacklisted. To do this, use the services:

DNS records

To protect yourself from spam, many email services require certain DNS records about your domain.

SPF record

The SPF record tells you which IP servers or services emails can be sent from. Emails sent from other servers will be filtered. Here are some popular meanings of this written:

Emails can only be sent from the server where your site is located:

TXT @ "v=spf1 a -all"

Emails can only be sent from the server where your website is located and the Gmail service (if you have linked your domain):

TXT @ "v=spf1 a include:_spf.google.com -all"

You can check the correctness of the SPF record in the online service https://mxtoolbox.com/spf.aspx .

DKIM record

When sending an email, you can sign it with a private key. The DKIM record specifies the public key that is used to verify the signature. There can be many such keys, in order to distinguish which key you signed the letter with, the so-called selector is indicated.

To add a DKIM entry with the “default” selector, you need to add the following entry:

TXT default._domainkey.your-site.com "v=DKIM1; p="open_rsa_key""

Instead of open_rsa_key, specify your public RSA key.

Do not forget to activate the signature function on your website, post server or email client. You can check the correctness of the DKIM signature through the online service https://mxtoolbox.com/dkim.aspx or [https://dkimvalidator.com /](https://dkimvalidator.com / “Free online service for checking DKIM”).

DMARC record

The DMARC entry specifies an email address for sending reports on attempts by attackers to send emails on your behalf. This entry is required by most mail services.

DMARC looks like this:

TXT _dmarc.your-site.com "v=DMARC1; p=none; rua=mailto:report@your-site.com; ruf=mailto:report@your-site.com; fo=1""

If someone tries to send an email on your behalf, a report will be sent to the address report@your-site.com .

You can check the DMARC record here https://mxtoolbox.com/dmarc.aspx .

Checking all settings

You can check all the settings at once using these services: https://mxtoolbox.com/deliverability and [https://www.mail-tester.com /](https://www.mail-tester.com / “Free online service for checking the mail system.”)

Newsletter

The newsletter requires increased caution. It is best to delegate this to third-party services, but if you decide to implement it yourself, then make sure that: - Your emails contain the link “Unsubscribe from mailing list”. - There are no stop words in your text: Special offer, Buy, Discount, etc. They can trigger spam filters to block your emails. Here you can find a large list of such words https://blog.hubspot.com/blog/tabid/6307/bid/30684/The-Ultimate-List-of-Email-SPAM-Trigger-Words.aspx.

Manual check

To make sure that emails from your server reach, send several emails manually to the following popular email services:

  • yandex.ru
  • gmail.com
  • outlook.com
  • mail.com
  • yahoo.com
  • aol.com
  • tutanota.de
  • icloud.com
We use cookies. By continuing to use the site, you agree to the processing of personal data in accordance with privacy policy. I agree