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

  1. Log in to ISPmanager:
  2. https://your-server-ip:1500
  3. Go to "Domains" > "DNS Manager".
  4. Select the domain for which you want to configure mail records.

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:

  1. Click "Add Record" in the DNS Manager.
  2. Select "MX" from the dropdown.
  3. Set Priority and enter the Mail Server.

Example: MX Records for Gmail (Google Workspace)

Priority Mail Server
1aspmx.l.google.com
5alt1.aspmx.l.google.com
5alt2.aspmx.l.google.com
10alt3.aspmx.l.google.com
10alt4.aspmx.l.google.com

Example: MX Records for Self-Hosted Mail Server

Priority Mail Server
10mail.example.com
  1. 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:

  1. Click "Add Record".
  2. Select "TXT" from the dropdown.
  3. Set the Record Name as @ (or leave it empty).
  4. 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
  1. 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:

  1. Enable DKIM for Your Mail Server:
    • If using Exim, run:
    • sudo exim -bP dkim
    • If using Postfix, generate a DKIM key using OpenDKIM:
    • sudo opendkim-genkey -s default -d example.com
    • Copy the public key to your clipboard.
  2. 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...
  1. 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:

  1. Click "Add Record".
  2. Select "TXT".
  3. Set the Record Name as _dmarc.
  4. 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
  1. 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:
  • check-auth@verifier.port25.com
  • Use Mail-Tester to analyze email deliverability.

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.