How to Block Spam Email in cPanel and Strengthen Email Authentication

No one wants their legitimate email to be marked as spam by recipients. No one wants to receive spam in their inbox. Dealing with a blacklisted domain is time-consuming for website owners and email subscribers. Below we cover how to improve email authentication for emails sending from your domain and server while reducing the amount of spam your email accounts receive in the inbox.

DKIM & SPF

Domain Key Identified Mail (DKIM) and Sender Policy Framework (SPF) ensure an email hasn’t been modified since departing the original sender and only approved servers are sending emails from a domain respectively. You can read more about how both work to block spam in our more in-depth article. To enable each requires the press of a button.

  1. Login cPanel.
  2. Select Authentication.
  3. Enable DKIM and SPF.

Shared Hosting customers should have +include:smtp.servconfig.com -all within your SPF record to work with SpamExperts.

Enable DKIM & SPF by Default on VPS

VPS users can set SPF and DKIM to be enabled by default in WHM Tweak Settings for newly created cPanel accounts.

  1. Login WHM as root.
  2. Select Tweak Settings.
  3. The easiest way to find both settings is to search “newly created account.” Once you Select On for DKIM and SPF, press Save.
    Enabling DKIM and SPF be default

     

     

DMARC

Domain-based Message Authentication, Reporting and Conformance (DMARC) ensures email is properly authenticating against DKIM and SPF standards and blocks any fraudulent activity. Its an easy way for email senders and receivers to determine whether a given message is legitimate and what to do with spam emails. For example, a strong DMARC record prevents Mail Delivery Failed emails stating you attempted to email accounts you’ve never emailed and that look illegitimate.

  1. Login cPanel.
  2. Search and select Zone Editor. Older cPanel accounts may instead have Advanced Zone Editor.
  3. Select Add Record to create a TXT record to enter the DMARC record.
    Below is a basic addition added to the Zone Editor:
    v=DMARC1; p=reject; sp=none; rf=afrf; pct=100; ri=86400For the highest authentication, add the following:

     

    v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s;pct=100;fo=0;rf=afrf;ri=86400New DMARC record in cPanel

     

PTR / Reverse DNS Record

An IP address Pointer (PTR) Record looks like a subdomain but is the best way for VPS / Dedicated customers to authenticate email from your server. The PTR would replace anything using your current server hostname – cPanel / WHM URLs and email settings. For example, vps12345.inmotionhosting.com could become secure.domain.com or semail.domain.com.

To start the process, read the section “Changing Your Server’s Hostname” in our VPS as a Mail Server guide and decide on a PTR name which would apply to the entire server. You should contact our Live Support for additional assistance. The PTR request takes up to 24 hours to complete. If you have issues logging into cPanel or WHM during that time, you can do so via AMP.

Note: All above DNS changes may require ~4-24hrs for propagation. Updating the Start of Authority (SOA) in WHM Edit DNS Zone (for VPS/Reseller accounts) can also ensure DNS records update within 24 hours.

Spam Filters / SpamAssassin

SpamAssassin, or Spam Filters on newer cPanel accounts, filters incoming spam received by email accounts with a score rating system determining how many suspicious items are allowed in an email before marking it as junk. You can also blacklist email addresses.

  1. Login cPanel.
  2. Select SpamAssassin or Spam Filters.
  3. Press Enable for the process and the Spam box.
  4. Edit the Score settings.

These changes are immediate but don’t affect already received emails.

SpamExperts to Block Spam Remotely

Shared hosting accounts can use SpamExperts to block spam remotely by editing your MX records in cPanel and logging into your SpamExperts account. You can read more in our SpamExperts Education Channel.

Note: You’ll need to contact our Live Support to enable SpamExperts beforehand.

Email Filters

Sometimes it’s helpful to set email filters in cPanel to redirect emails to spam. Common examples include emails with explicit words or the subject Mail Delivery Failed. Email filters allow more customization and shouldn’t be confused with forwarders.

Feel free to read our more in-depth article covering how emails can be labeled as spam internally or externally by other email providers.

For more information, check out our Email Knowledge Base.

Go Unlimited with Exceptional Shared Hosting

Upgrade your Shared Hosting today and take your business to the next level! Get unlimited NVMe SSD storage, cPanel, professional email and over $400 in savings.

check markFree Domain check mark24/7 Human Support check mark100% Money-Back Guarantee

Shared Hosting

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

2 thoughts on “How to Block Spam Email in cPanel and Strengthen Email Authentication

  1. This is the most unintelligible article I have ever read. Please provide information in clear english for non-cyber IT experts.

Was this article helpful? Join the conversation!