Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED The mail server could not deliver mail to root

Discussion in 'E-mail Discussion' started by philsward, Aug 29, 2017.

  1. philsward

    philsward Member

    Jan 3, 2017
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    Looking at the WHM Mail Delivery Reports, I was met with the following error:

    The mail server could not deliver mail to The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.

    I researched the issue and despite having an email address setup in Server Contacts -> Edit System Mail Preferences which is the typical suggestion, I was still receiving the error. I finally ran across a blog that pointed to a fix for this situation that did indeed work. I'm posting this to hopefully get some SEO going to help others.

    1) First thing to check are the settings in:

    Server Contacts -> Edit System Mail Preferences

    Make sure the setting: The system currently forwards mail for “root” is set to a valid email address.

    The other two sections, Forward mail for “cpanel” to: and Forward mail for “nobody” to: can either be set to "root" or a valid email address. If you're the only person maintaining the server, it would make the most sense to just point it to root. (It's perfectly fine to enter an email address too if you want)

    2) Second thing to check if you're getting the "The mail server could not deliver mail to root" error, is to look in:


    Look specifically for your servers host name. If it doesn't exist, add it.

    In my case, my hosting company was bought out by another company and the cPanel instance was transferred to the new companies servers. When I checked /etc/localdomains, the very first host name was the OLD hostname for the old hosting provider. Once I removed the old line and updated this with the new host name, the emails sent to began working properly.


    While researching this issue, others who had a similar error had issues with their DNS and MX entries. If this post doesn't help, chances are it could be related to your DNS, rDNS, MX records or all of the above.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hi @philsward,

    Thank you for taking the time to create this post to help those facing the same issue.

    We generally see this issue when the hostname is manually changed on the server from the command line with the "hostname" command. An entry for the hostname is automatically added to the /etc/localdomains file during the initial setup phase of the cPanel installation, and any time the hostname is changed through the "WHM >> Change Hostname" feature.

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Gino Viroli likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice