System Emails Frozen In Mail Queue – cPanel/WHM
cPanel sends a range of system emails to the accounts you specify inside WHM. These emails can provide important clues if you are facing any issues with your cPanel server. If you do not add email addresses inside WHM then system emails will be frozen in the cPanel mail queue.
Sometimes even if you set all three email alerts. It’s possible system mail for the root user might still not be delivered and system emails will become frozen in the mail queue. This is usually down to the hostname of the server missing from the /etc/localdomains file. And this happens mostly when you have moved cPanel servers. Before we check this file ensure you have set the correct email address in WHM.
Fix System Emails Frozen In cPanel Mail Queue
First, log in to the root WHM account and from the menu options click Edit System > Mail Preferences
To ensure system emails do not get frozen in the queue on cPanel servers, set all of these options, cPanel, Nobody, and Root to a local account on the server. However, you should never set these to an email provider like Gmail or Outlook. These rate limit the mail coming from servers.
In an SSH console, you can check these are set correctly by issuing the below command as the root user
cat /etc/localaliases
Check For Forwarders
cPanel sends mail to the administrator forwarding the emails to the email addresses you specify in WHM. Check that these are configured correctly by checking the email you have specified for root, cPanel and Nobody is listed in the files below.
cat /var/cpanel/userhomes/cpanel/.forward
cat /root/.forward
Check The Local Domains File
And finally, check the /etc/localdomains file has your server’s hostname listed. If your server’s hostname is missing from this file this will also cause root email to become stuck and frozen in the mail queue
cat /etc/localdomains
If you can’t see the hostname in this file just add it at the top and save the file.
nano /etc/localdomains
After checking these files any system emails frozen in the cPanel mail queue will be processed the next time.