Troubleshooting email in WHM

In this article we will go over the process used to investigate Email delivery issues on a WHM server. This can be helpful when a user is having issues receiving or sending Emails. The Mail Troubleshooter tool provided in WHM works by tracing the route an Email would take when sent to the provided Email address.

  1. With WHM opened in your browser, (a) type ‘Mail Troubleshooter’ into the search box. This will sort the menu options for you, (b) now find and click “Mail Troubleshooter”.
    troubleshoot-email-pt1
  2. Now on the Mail Troubleshooter page you should see a text box labeled as “Email to trace”. Enter the Email address you wish to trace here.
    troubleshoot-email-pt2
  3. Once you click Submit, you will be on the results page.
    troubleshoot-email-pt3

The example above shows a working configuration for a Gmail based email address. If the results show no errors the issue is likely related to improper Email client settings.
Below you will find an example of results showing errors, the issue here is that the domain has DNS problems and is not able to be resolved.

troubleshoot-email-pt4

Enabling DomainKeys Identified Mail (DKIM)

DomainKeys Identified Mail (DKIM) is a way to attach an encrypted digital signature to your email. Like adding an SPF record to your server, DKIM helps prevent email spoofing. Email spoofing is when spammers send email that looks like it’s coming from your email address. Spammers spoof your address to make it more likely that recipients will open spam emails, less likely that messages will be marked as spam, and harder to find the true spam source. If your address is spoofed, your server could get flagged as a spam server and you can have trouble sending legitimate mail, even if you aren’t doing anything wrong. This is commonly known as having a bad mail reputation.

Outgoing DKIM works by generating an encrypted digital signature that is attached to email messages sent by your server. This signature is generated using a public key you save as a DNS record. Theoretically, only you have access to your DNS records, so mail signed using this key should be unmodified and verified as coming from your server. If you don’t use your server to send mail, adding DKIM records to your server will have no effect on your mail reputation.

Using Plesk?

DKIM is not natively supported in Plesk 12. Instead, Plesk uses DomainKeys. If you’d like to use DKIM, it is supported with certain Plesk MailEnable plans. If you specifically need DKIM, contact our Heroic Support team to learn more about MailEnable.

There are three parts to enabling DKIM:

Generating Your DKIM Key

On a cPanel server, generating a DKIM key is easy! cPanel does it for you.

  1. Log into the cPanel account with email accounts where you’d like to enable DKIM. DKIM records are tied to a domain, you each domain you email from will need its own record.
  2. Scroll down to Email and click on Authentication.
    dkim1
  3. On the Email Authentication page, you’ll see two different methods: DKIM and SPF. We recommend using both, but this walkthrough will only cover DKIM. We have a separate article on SPF records. In the DKIM section, click Enable if DKIM is disabled.
    dkim2
  4. Once you enable DKIM, you’ll see a field that shows your current raw DKIM record. This is the public key you need to add to your DNS records. It should look something like this:

    default._domainkey IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyGm4KfaLQsOiNqfNGT0DDa+XE+TmIyr03F3/AMU8SXFwgItBU/PikYTmIyr07yhQoqlPrSL27l8XHf8AMIIB1LtxU2/490wRkuu9ZorEjRkIXSbev1GyAinBQNa5Rln2S+8AMIIBhZzfkNw7panbVJ0HPREiZAJ5TQEX1LjTqB/nArmNaMXaRUCwmYzGY45z8" eW2BJMM7Ftsj3nOTmIyr0LFSL27l8OaMDdcvpCglrFWoF1dXA78ORuvMSL27l8A5+UWRFBQ4NP6awWYj2LTSyeNeTlafawRk2B3C/dNcwpoLjz3T1wBHctcLnuC13+nMzzyUtgIVgz/7Ka8AMIIBQIDAQAB\;

Copy this record and paste it into a text document to prepare for the next step: adding your DKIM record to DNS.

Adding Your DKIM Key to DNS

Now that you’ve generated your DKIM record, you need to add it to your DNS records. These directions are different depending on where your DNS is hosted:

If you don’t know where your DNS is hosted, read our article on how to find out first!

Your DNS Is Hosted at Liquid Web

If you are using Liquid Web’s nameservers, you can update your DNS records right in your Liquid Web account. Liquid Web’s nameservers are:

  • ns.liquidweb.com
  • ns1.liquidweb.com
  • ns.sourcedns.com
  • ns1.sourcedns.com

As long as your domain is using one of these nameservers, you’re good to go!

  1. Before you begin to add your DKIM record to your Liquid Web account, there is a small amount of formatting to do. The text portion of your DKIM record should look similar to this:
    "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyGm4KfaBhFDhZzfkNw7pan+XE+TmIyr03F3/AMU8SXFwgItBU/PikYlddmgf7yhQoqlPrUMEqPZXHfIE8uGg1LtxU2/490wRkuu9ZorEjRkIXSbev1GyAinBQNa5Rln2S+AeBhFDhZzfkNw7panbVJ0HPREiZAJ5TQEX1LjTqB/nArmNaMXaRUCwmYzGY45z8" eW2BJMM7Ftsj3nOPYRbYxLFCzroSSOaMDdcvpCglrFWoF1dXA78ORuvMSL27l8A5+UWRFBQ490wRkuu9ZorEjRNeTlafawRk2B3C/dNcwpoLjz3T1wBHctcLnuC13+nMzzyUtgIVgz/7KaGQv5rnQIDAQAB\;
    Some punctuation needs to be removed to format this record correctly.

    • Remove the quotation mark at the beginning of the record.
    • Remove the space and quotation mark in the middle of the record.
    • Remove the slash and semicolon at the end of the record.

    With those few edits, you’re all set to load your DKIM record into your Liquid Web account.

  2. Log into your Liquid Web account.
  3. In the left navigation menu, click on Domains.
  4. The Domains Dashboard has three tabs along the top. Click on DNS.
  5. Scroll down to Current DNS Zones and click the [+] next to the domain where you’re adding the DKIM record. You’ll see a list of your current DNS records. At the bottom of that list, click on Add a New Record. Now, you can follow the steps you’d normally use to add a DNS record.
  6. The first field in your new record is for the subdomain. In this field, enter the first part of your record:
  7. The second field is the time to live, or TTL. This is how quickly new changes will take effect. You can match this to your other DNS records.
  8. Now, choose TXT from the Type dropdown menu.
  9. The last field is the data field. Here you’ll copy and paste the rest of the record cPanel created for you.
  10. Click the green checkmark to save your DNS record.

Now that your DKIM record has been added, all that is left is to add a TXT policy record.

Your DNS is hosted on the same server as your email

If you are using private nameservers on the same server as your email, cPanel will set up your DKIM records automatically! So, once you follow the steps to auto-generate your DKIM record, they are automatically added to your DNS zone in WHM. Just confirm they are correct in WHM:

  1. Log into WHM.
  2. In the search bar above the left navigation, search for “DNS.” Then, click on Edit DNS Zone.
  3. Click on the domain where you auto-generated the DNS record in cPanel, then click Edit.
  4. Scroll down and check to see that your DKIM records are included. If they are, you’re all set!
  5. If the SPF record isn’t there, simply add a new record by copying and pasting the DKIM record information into a new TXT record.

Now that your DKIM record has been added, all that is left is to add a TXT policy record.

Your DNS is hosted with another company

If you registered your domain at another company and host your DNS there, you log into your account with that company to manage your DNS. Find their DNS record editor and enter your DKIM record according to their specifications.

Now that your DKIM record has been added, all that is left is to add a TXT policy record.

Adding a TXT Policy Record

A policy record is a DNS TXT record that talks more generally about DKIM on your server. It shows your server uses DKIM verification and makes DKIM work more smoothly. A policy record is just one more DNS record. Wherever you added the DKIM DNS record, you’ll also add the policy record.

There are different tags that make up the text of a policy record:

  • t=y; tells other servers your domain is testing DKIM. This means if your DKIM isn’t working properly, other servers are less likely to reject your email.
  • o=~; means that some of your mail is signed by DKIM, but not necessarily all. o=-; means all your mail is signed by DKIM. So, if another server receives a message that isn’t signed, it will be rejected.
  • n=your information here; is a note. It doesn’t affect DKIM, but you can use it to explain more about your specific DKIM. This will show up in error logs if something DKIM verification fails.
  • r=postmaster@mysite.com; is the responsible email address for this domain. Use an email address you can access on your server.

Most likely, your policy record will look like this:

_domainkey IN TXT "t=y; o=~; n=Interim Sending Domain Policy; r=postmaster@mysite.com"

Using t=y; and o=~; will help your email be delivered even if the DKIM signature gets broken in transit from your server to the receiving server. Of course, replace “postmaster@mysite.com” with the responsible email address.

Entering your policy record is the exact same procedure as entering any other DNS record. Wherever you entered your domain-specific DKIM record is also where you should enter your policy record: either in your Liquid Web account interface, in WHM, or in the control panel of your external DNS provider

You’ve successfully created a DKIM record for your domain! You can check to make sure it’s working by sending a test message from a domain email account to check-auth@verifier.port25.com. You don’t have to include a subject or any body text. You’ll receive an automated reply with the status of DKIM, as well as other services you may have.

Import Emails with Webmail on a cPanel Server

When it comes to importing Emails on to a cPanel based server, using Webmail is the easiest method. Currently cPanel-based servers offer three different webmail interfaces [Horde, Squirrel Mail, and RoundCube] for viewing and managing email accounts without the need to setup an email client. This tutorial will focus on how to import emails from your server by utilizing the Horde Webmail interface.

While RoundCube does support email importing, it only allows you to do so with a single email at a time. This may not be an issue for some, but when working to import a large number of emails, this can be an inconvenience. Horde, on the other hand, allows the importing of entire folders, which can speed things up when working to import in bulk.

Pre-flight Checklist

  • These instructions are intended specifically for a managed Liquid Web server with cPanel.
  • The Horde Webmail interface must not be disabled on the server.
  • Access to the cPanel which owns the email address will be necessary.

Import Emails with Horde Webmail

For importing emails via Horde the process is largely the same as when exporting. You will need to start the same by opening the webmail interface for the email account. Once you are logged into the email address and have horde open you can proceed with the importing directions below.

Our example for importing continues from the examples set in exporting found above. Though, in this example we are using a different email account that is currently empty of any Emails.
    1. From the Horde interface of the account you wish to import to, right click the folder you would like emails imported to. We will use the Inbox.

Email Import - Horde Folder Menu

    1. From the folder drop down menu select “Import”

step-two

    1. You will now see a popup to select the file for uploading, select the file by clicking ‘Browse’ to use the file picker.

Email Import - Horde File Select

  1. With a file selected click the “OK” button and Horde will begin the upload and import. After clicking OK you should return to the main Horde interface, there you will begin to see the imported emails to populate.

With this step complete you can now see that the emails were imported. You can see this below by comparing the two screenshots:

Email Export - Horde Interface

Import Results

Export Emails with Webmail on a cPanel Server

When it comes to exporting Emails off of a cPanel based server, using Webmail is the easiest method.hod. Currently cPanel-based servers offer three different webmail interfaces [Horde, Squirrel Mail, and RoundCube] for viewing and managing email accounts without the need to setup an email client. This tutorial will focus on how to export emails from your server by utilizing the Horde Webmail interface.

While RoundCube does support email exporting, it only allows you to do so with a single email at a time. This may not be an issue for some, but when working to export a large number of emails, this can be an inconvenience. Horde, on the other hand, allows the exporting of entire folders, which can speed things up when working to export in bulk.

Pre-flight Checklist

  • These instructions are intended specifically for a managed Liquid Web server with cPanel.
  • The Horde Webmail interface must not be disabled on the server.
  • Access to the cPanel which owns the email address will be necessary.

Export Emails with Horde Webmail

    1. Open webmail for the email address you would like to export.
      You can do this by either logging into webmail with the email address directly, or by going in through the cPanel account that owns the email address.

      Open Webmail via cPanel:

        1. Login to the cPanel account that owns the email address you are looking to export.
        2. On the main cPanel page for the account find and click the “Email Accounts” button.

      Email Export Main cPanel

        1. Now on the Email Accounts page, find the email address you’d like to export emails for. Click the “More” button and then find and click “Access Webmail”.

      cPanel Email - Action Menu

      Open Webmail directly:

      1. To open webmail directly you would pull up the webmail login by visiting:
        http://[Server IP]:2097 or http://[Server Hostname]:2097
      2. You should now see a Webmail login page where you can enter the email address and respective password to login.

Once the Webmail login is complete, either by direct login or login via cPanel, you will be presented with a page for Webmail selection.

    1. You should select ‘Horde’ when presented the choice of Webmail application. Once Horde is fully loaded you will see an interface similar to the following screenshot:
      Email Export - Horde Interface

      You can choose any folder you would like, for this example we will be using the Inbox.
    2. From Horde, right click ‘Inbox’ and select ‘Export’ from the list.

Email Export - Horde Folder Menu

  1. You will now see a popup with export options, you can simply click ‘OK’ to get the exported emails in MBOX format.

Email Export - Horde Download

How To Set Your Default Address in cPanel

  1. This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen.

    image01

  2. Now let’s set our default email address.

    image02

  3. Click the Default Address icon.

    image03

  4. This is where you set your default address, so that all unrouted email will have a place to go.

    image04

  5. Currently our default address is set to our account name, meaning all unrouted emails will be stored in our main email account.

    image05

  6. Since we likely won’t be using that address, let’s set it to an email address we will be using.

    image06

  7. Click "Forward to email address".

    image07

  8. Then enter the email address you want as your default address.

    image08

  9. Click "Change".

    image09

  10. That’s it! The default address has been set.

    image10

  11. The new default address setting can be seen here.

    image11

  12. You can always update your default address setting by returning to this screen.

    image12

 

How To Set up an Autoresponder in cPanel

  1. This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen.

    image01

  2. Now let’s setup an autoresponder.

    image02

  3. Click the Autoresponders icon.

    image03

  4. This is where you create autoresponders for your email addresses. Autoresponders send messages back automatically, to anyone who sends an email to a specified address.

    image04

  5. Enter an interval value, then enter an email address you want to set an autoresponder for.

    image05

  6. An interval of 8 hours means the autoresponder cannot send more than 1 email to an address within an 8 hour period.

    image06

  7. Now complete the rest of the autoresponder email.

    image07

  8. When finished, click "Create/Modify".

    image08

  9. That’s it! The autoresponder has been setup. Now when someone sends an email to John, the "Out of Office" email will automatically be sent to them.

    image09

 

How To Set up Email Forwarding in cPanel

  1. This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen.

    image01

  2. Now let’s setup an email forwarder.

    image02

  3. Click the Forwarders icon.

    image03

  4. An email forwarder allows you to send a copy of all email from one address to another. This is handy when you have multiple addresses, but only want to have to check one of them.

    image04

  5. Click the "Add Forwarder" button.

    image05

  6. Enter the email address you want to forward…

    image06

  7. Then enter the address you want the message forwarded to.

    image07

  8. Click "Add Forwarder".

    image08

  9. That’s it! The email forwarder has been setup, and will start working immediately.

    image09

 

How To Set up Email Filters in cPanel

  1. This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen.

    cpanel-paperlantern-6-emailfilters--01

  2. Now let’s setup an email filter.

    cpanel-paperlantern-6-emailfilters--02

  3. Click the User Filters icon.

    cpanel-paperlantern-6-emailfilters--03

  4. Then click the "Manage Filters" link next to the email account you want to create a filter for.

    cpanel-paperlantern-6-emailfilters--04

  5. Then click "Create a New Filter".

    cpanel-paperlantern-6-emailfilters--05

  6. Enter a name for the filter.

    cpanel-paperlantern-6-emailfilters--06

  7. Then specify the rule.

    cpanel-paperlantern-6-emailfilters--07

  8. Now define an "action" for the rule.

    cpanel-paperlantern-6-emailfilters--08

  9. In this case, the action is to deliver the email to the inbox.

    cpanel-paperlantern-6-emailfilters--09

  10. To finish, click the "Create" button.

    cpanel-paperlantern-6-emailfilters--10

  11. That’s it! The filter has been created.

    cpanel-paperlantern-6-emailfilters--11

  12. You can always return to this screen to create new filters, or edit or delete existing ones.

 

How To Enable Spam Protection in cPanel

  1. This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen.

    cpanel-paperlantern-7-spam--01

  2. Now let’s learn how to enable spam protection.

    cpanel-paperlantern-7-spam--02

  3. Click the BoxTrapper icon.

    cpanel-paperlantern-7-spam--03

  4. Box Trapper protects your inbox from spam by requiring all email senders who aren’t on your Whitelist, to reply to a verification email before you can receive their mail.

    cpanel-paperlantern-7-spam--04

  5. To enable BoxTrapper for an email address, click "Manage".

    cpanel-paperlantern-7-spam--05

  6. Then click the "Enable" button.

    cpanel-paperlantern-7-spam--06

  7. BoxTrapper has now been enabled for this address. Click "Go Back".

    cpanel-paperlantern-7-spam--07

  8. Next you’ll want to configure your BoxTrapper settings. Click the "Configure Settings" link.

    cpanel-paperlantern-7-spam--08

  9. You can set various options here, including auto-whitelisting for addresses you send email to.

    cpanel-paperlantern-7-spam--09

  10. Next click "Edit Confirmation Messages".

    cpanel-paperlantern-7-spam--10

  11. From here you can edit the standard confirmation messages already setup for you.

    cpanel-paperlantern-7-spam--11

  12. Next, click "Edit White/Black/Ignore Lists".

    cpanel-paperlantern-7-spam--12

  13. From here you can add addresses to your Whitelist, Blacklist, and Ignore list.

    cpanel-paperlantern-7-spam--13

  14. Once you have BoxTrapper setup the way you want, you’ll notice a huge reduction in spam.

    cpanel-paperlantern-7-spam--14

  15. Another option for controlling spam is to use SpamAssassin.

    cpanel-paperlantern-7-spam--15

  16. You can use SpamAssassin in conjunction with BoxTrapper for maximum spam control, or you can use BoxTrapper on its own, or SpamAssassin on its own.

    cpanel-paperlantern-7-spam--16

  17. Click to Enable SpamAssassin.

    cpanel-paperlantern-7-spam--17

  18. Then click "Go Back".

    cpanel-paperlantern-7-spam--18

  19. You’ll now want to configure SpamAssassin, so click the "Configure" button.

    cpanel-paperlantern-7-spam--19

  20. From here you can setup your blacklist with email addresses you KNOW are spam …

    cpanel-paperlantern-7-spam--20

  21. … and can add email addresses to your whitelist … addresses you KNOW are NOT spam.

    cpanel-paperlantern-7-spam--21

 

How To Use Webmail from Within cPanel

  1. This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen.

    cpanel-paperlantern-9-webmail--01

  2. Now let’s learn how to use webmail to access our email from within cPanel.

    cpanel-paperlantern-9-webmail--02

  3. Click the Email Accounts icon.

    cpanel-paperlantern-9-webmail--03

  4. To access webmail for the main account, you would use this link… but we’re not going to do this because we want to access webmail for a specific account.

    cpanel-paperlantern-9-webmail--04

  5. Instead, click the "More" drop down box for the email account you wish to access.

    cpanel-paperlantern-9-webmail--05

  6. Then click "Access Webmail".

    cpanel-paperlantern-9-webmail--06

  7. Type the email address password, then click "Log in".

    cpanel-paperlantern-9-webmail--07

  8. This is the Horde webmail main screen, where we can check our inbox …

    cpanel-paperlantern-9-webmail--08

  9. … and compose a "New Message".

    cpanel-paperlantern-9-webmail--09