To ensure email delivery, prevent spam, and enhance email security, you need to properly configure MX, SPF, DKIM, and DMARC records in ISPmanager.
Access DNS Management in ISPmanager
- Log in to ISPmanager:
- Go to "Domains" > "DNS Manager".
- Select the domain for which you want to configure mail records.
https://your-server-ip:1500
Configuring MX (Mail Exchange) Records
Purpose: MX records specify which mail servers handle incoming emails for your domain.
Steps to Add MX Records in ISPmanager:
- Click "Add Record" in the DNS Manager.
- Select "MX" from the dropdown.
- Set Priority and enter the Mail Server.
Example: MX Records for Gmail (Google Workspace)
| Priority | Mail Server |
|---|---|
| 1 | aspmx.l.google.com |
| 5 | alt1.aspmx.l.google.com |
| 5 | alt2.aspmx.l.google.com |
| 10 | alt3.aspmx.l.google.com |
| 10 | alt4.aspmx.l.google.com |
Example: MX Records for Self-Hosted Mail Server
| Priority | Mail Server |
|---|---|
| 10 | mail.example.com |
- Click "Save" and wait for DNS propagation.
Configuring SPF (Sender Policy Framework) Record
Purpose: SPF records prevent unauthorized email senders from sending emails on behalf of your domain.
Steps to Add SPF Record in ISPmanager:
- Click "Add Record".
- Select "TXT" from the dropdown.
- Set the Record Name as @ (or leave it empty).
- Enter the SPF record under Value.
Example: SPF Record for a Self-Hosted Mail Server
v=spf1 mx a ip4:192.168.1.1 ~all
Example: SPF Record for Google Workspace
v=spf1 include:_spf.google.com ~all
Example: SPF Record for Microsoft 365 (Office 365)
v=spf1 include:spf.protection.outlook.com -all
- Click "Save".
Configuring DKIM (DomainKeys Identified Mail) Record
Purpose: DKIM adds a digital signature to emails to verify that they were sent from an authorized server.
Steps to Enable DKIM in ISPmanager:
- Enable DKIM for Your Mail Server:
- If using Exim, run:
- If using Postfix, generate a DKIM key using OpenDKIM:
- Copy the public key to your clipboard.
sudo exim -bP dkimsudo opendkim-genkey -s default -d example.com - Add a TXT Record for DKIM in ISPmanager:
- Click "Add Record".
- Select "TXT".
- Enter default._domainkey as the Record Name.
- Paste the DKIM Public Key in the Value field.
Example DKIM Record
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAO...
- Click "Save".
Configuring DMARC (Domain-based Message Authentication, Reporting & Conformance) Record
Purpose: DMARC protects against email spoofing and phishing attacks by enforcing SPF and DKIM policies.
Steps to Add DMARC Record in ISPmanager:
- Click "Add Record".
- Select "TXT".
- Set the Record Name as _dmarc.
- Enter the DMARC Policy in the Value field.
Example: Basic DMARC Policy (Monitor Mode)
v=DMARC1; p=none; rua=mailto:dmarc@example.com
Example: Strict DMARC Policy (Reject Spoofed Emails)
v=DMARC1; p=reject; rua=mailto:dmarc@example.com
- Click "Save".
Verify Your Email Configuration
Once the DNS records are updated, verify them using online tools:
Check DNS Propagation:
Test SPF, DKIM, and DMARC:
- Send an email to:
- Use Mail-Tester to analyze email deliverability.
check-auth@verifier.port25.com
Troubleshooting Email Issues
| Issue | Possible Fix |
|---|---|
| Emails going to spam | Ensure SPF, DKIM, and DMARC are correctly configured. |
| Emails not sending | Verify MX records and restart mail server. |
| DKIM not signing emails | Check if DKIM is enabled on the mail server. |
| SPF "Fail" errors | Make sure SPF includes the correct mail server IP. |
- MX Records: Define the mail server handling emails.
- SPF Record: Prevents email spoofing by verifying senders.
- DKIM Record: Digitally signs outgoing emails for authenticity.
- DMARC Record: Enforces email security policies to stop phishing attacks.


