In the modern world, email communication remains a critical tool for both personal and professional interactions. However, the prevalence of spam has necessitated the implementation of spam filters, which can occasionally misidentify legitimate emails as spam. This article aims to provide comprehensive guidance on preventing your emails from being flagged as spam, ensuring that your important messages reach their intended recipients.
Setting up a PTR Record
A PTR record, also known as a reverse DNS record, serves as the counterpart to the A record in a DNS zone. While an A record associates a domain name with an IP address, a PTR record links a domain name to an IP address.
This process typically involves contacting your server provider, as PTR records are linked to the server’s IP address. To establish a PTR record, log into your provider’s admin dashboard, navigate to the DNS management or PTR records section, and create a new record.
For Server Gigabit customers, PTR records can be easily created in the Customer Control Panel (CCP) by following these steps:
-
Access the CCP.
-
Navigate to “Control Panel” > “Reverse DNS Management.”
-
Click on the notepad icon next to the IP address for which you want to create a PTR record.
-
Create the PTR record as instructed.
-
Repeat the process if you are using IPv6 in addition to IPv4.
Creating a SPF Record
SPF records (Sender Policy Framework) specify authorized IP addresses for sending emails from a domain. Many email servers consider emails from domains without SPF records as spam. SPF records should be set up at your domain registrar’s admin dashboard or DNS provider. Here’s an example of an SPF record:
86400 in TXT "v=spf1 +a +mx ~all"
This allows emails from the IP address specified in the A record and the mail server mentioned in the MX record. For Server Gigabit web space packages, use the following SPF record:
86400 in TXT "v=spf1 +a +mx +include:mail-relay.servergigabit.net ~all"
If you have a specific configuration, consider using SPF-Wizard to create the appropriate SPF record.
DKIM and DMARC Records
DKIM (DomainKeys Identified Mail) generates digital signatures for outgoing emails, verifying authenticity and preventing tampering. DMARC (Domain-based Message Authentication, Reporting and Conformance) combines DKIM and SPF, providing clear instructions for handling non-conforming emails.Using DMARC and DKIM greatly lowers the chance that emails will be reported as spam.
Both DKIM and DMARC records can be set up in your registrar’s admin dashboard or the Server Gigabit CCP. To add to that, Mailcow Dockerized and other mail server software can also generate the DKIM key. Here’s an example of a DKIM record:
dkim._domainkey IN TXT "v=DKIM1; k=rsa; t=s; s=email; p=..."
Here’s an example of a DMARC record:
_dmarc IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]"
Avoid Spamming
Avoid spamming, which involves sending unsolicited bulk emails. Build a permission-based email list by obtaining explicit consent from recipients. Provide valuable and relevant content, maintain a reasonable sending frequency, and use transparent subject lines. Always include clear unsubscribe options in newsletters and promptly honor recipient preferences. You can reduce the likelihood that your emails will be flagged as spam by maintaining ethical email practices, honoring consent, and providing insightful content.
Testing your Configuration
Here are a few tools you could use to test the DNS Setup (including SMTP Banner, DKIM, DMARC etc.):
- MX Toolbox (DNS, SMTP, RBL)
- port25.com (DKIM, SPF)
- Mail-tester (DKIM, DMARC, SPF)
- DMARC Analyzer (DMARC, SPF)
- MultiRBL.valli.org (DNSBL, RBL, FCrDNS)