Introduction
This article explains the common DNS records for email domains and how to set them up so your emails can be sent and received reliably.
Mail Related DNS Records
1. DNS A Record: WebMail URL
- Purpose: Add an A or CNAME record for mail.example.com that points to your Webmail server’s IP.
- Effect: Users can access webmail using http://mail.example.com or http://mail.example.com:9998 (depending on your server setup).
2. SPF Record
Some major email providers, like Hotmail and AOL, now require a special type of DNS record called an SPF (Sender Policy Framework) record. This record helps prevent spammers from sending emails that look like they come from your domain.
You can find clear instructions on how to format your SPF record at Dmarcian. Keep in mind that the domain owner may have specific rules for what to include in this record.
More details here: https://portal.smartertools.com/kb/a3502/spf-in-simple-terms.aspx?KBSearchID=900982
3. MX Record
MX Records (Mail Exchange Records) are an essential part of email delivery. They tell the internet which server should receive emails for your domain.
- Priority: This number decides the order in which mail servers are used. Emails are sent first to the server with the lowest priority number. If you have multiple servers, set a lower number for your main mail server and a higher number for backup servers.
- Record field: Usually, you can leave this as “@” to indicate the root domain.
- Address field: This is the mail server’s address. It’s better to use a domain name instead of an IP address. Typically, you first create an A record called “mail” pointing to your mail server’s IP, and then use mail.yourdomain.com here.
- Example MX records:
Priority: 10 | Record: @ | Address: mail.domain.com
Priority: 20 | Record: @ | Address: mail2.domain.com
This setup ensures that emails are properly routed to your main and backup mail servers.
4. PTR Record
PTR records resolve IP addresses into hostnames. By setting up a PTR record, the receiving server can do a reverse DNS lookup to verify the sender.
5. DMARC Record
DMARC (Domain-based Message Authentication, Reporting & Conformance) is a modern way to protect your email. It works with two other records, SPF and DKIM, to make sure that emails sent from your domain are genuine. DMARC also helps block fake or fraudulent emails that try to look like they came from you.
Learn more: https://portal.smartertools.com/kb/a3501/dmarc-in-simple-terms.aspx?KBSearchID=900981
6. DKIM Record
Mail signing protocols, such as DomainKeys and DKIM signing, verify the authenticity of a message and can be used to protect users from phishing schemes or spam attacks.
Add SPF,MX ,DKIM ,DMARC, PTR Record
1. Add DNS A record for mail, MX record, SPF records
- Through WebsitePanel control panel,please refer to the article:
https://portal.databasemart.com/kb/a263/how-to-update-dns-records-for-domain-by-websitepanel.aspx - Through ISPconfig control panel,please refer to the article:
[How to Update DNS Records in ISPConfig]
2. Add PTR Record
Please refer to the article https://portal.databasemart.com/kb/a266/how-to-configure-rdns.aspx to add PTR record for email server. Please use a valid email domain name as the value of PTR record.
3. Add DKIM &DMARC
The DKIM key is generated from the email server.
Generate DKIM Key via SmarterMail:
[Email Signing with DKIM Key and DMARC Record in SmarterMail]Generate DKIM Key via MailEnable:
https://portal.databasemart.com/kb/a556/how-to-create-dkim-record-for-domain-in-mailenable.aspxAfter generating the key, please refer to the step 2 and three of the above article to add DNS records for DMARC and DKIM
3.Generate DKIM Key on Linux :
[How to Setup DomainKeys(DKIM) on Linux?]
Conclusion
Properly setting up DNS records is crucial for ensuring your email server works reliably and securely. Adding the correct PTR record, along with MX, SPF, DKIM, and DMARC records, helps verify that your emails are legitimate, improves delivery rates, and protects your domain from spam and phishing attacks.
Following these steps for email server setup will ensure smooth email communication and safeguard your domain reputation.
DNS records setup, PTR record configuration, Email server configuration, MX record setup, SPF DKIM DMARC setup, Email authentication, Secure email server, Domain email setup, Reverse DNS for email, Email deliverability tips
