Bobcares

Email accounts missing from cpanel – How to fix it

by | Jun 22, 2020

Webmasters and website owners often notice email accounts missing from cPanel after a migration. The attempt to create email account manually triggers the error message “The account already exists”.

As a part of our Server Management services, we help customers to fix email related errors routinely.

Today, let’s look into some of the possible reasons and fixes to make the email accounts visible in cPanel again.

 

What makes Email accounts missing from Cpanel?

Often after migration, some users notice that the email accounts does not display in cPanel even after the copy of the emails to destination server. As per cPanel’s folder structure, it stores only the mailboxes and the received/sent emails inside the folder  /home/cpanelusername/mail. The /home/$user/etc/$domain/shadow and /home/$user/etc/$domain/passwd files contain the password and other settings of each email account.

If the passwd and shadow files are not copied over properly, email accounts will not display in cPanel. Even if users try to create those email accounts manually, it will fail with the below error.

Email accounts missing from cpanel

Let us now look at the possible reasons for the email vanishing from cPanel :

  • Missing files in etc folder
  • Cache and temp file inside the .cpanel directory
  • Incorrect file permission

 

Missing files in etc folder

As we discussed earlier if the “/home/$user/etc/$domain/shadow” and the “/home/$user/etc/$domain/passwd ” are missing after migration, email accounts will vanish from cPanel. Though the mails will be physically present in the server, it won’t be able to fetch the details from backend to cPanel. Restoration of these files from a backup is the fix here.

At times even if the file is present in the server, won’t be able to fetch the accounts. This happens when files get corrupted or entries of some email accounts are missing from the file. You can open the shadow file and verify the contents. Restoration of the file can fix the issue here as well.

Also, users may find corrupt passwd and shadow files at source end prior to migration. In such situations, a preferable method would be to create the email accounts manually and then restore the mail folder into the new folder created.

 

Incorrect file ownership

The ownership of the shadow and passwd file is also an important factor that makes accounts invisible in cPanel. The ideal ownership that these files require is:

user:mail

If the ownership of the folder is anything different from the value given above, it should be corrected with the help of chown command.

 

Cache and temp file in .cpanel directory inside the users home directory

At times the emails missing from cPanel can occur due to a large number of cache and temp files in .cpanel directory inside the user’s home directory. This directory contains the email_accounts.cache, and email_accounts.yaml, required to load the email accounts.

If any of these files contain old data or corrupted data, it may make the mail accounts missing from cPanel. The possible fix here would be to remove this folder. If you are connecting using SSH, a simple rm command on that folder will do the task.

Email accounts missing from cpanel

Similarly, this folder can be deleted from the File Manager option in cPanel as well. After deleting the folder, ensure to restart the cPanel service. The contents of the folder will be automatically recreated when users try to access the email account again.

 

[Need help to fix email accounts missing from cPanel? We are available 24×7]

 

Conclusion

In short, email accounts vanishes from cPanel due to a variety of reasons. It includes missing shadow and passwd file, incorrect ownership, etc. Today we discussed how our Support Engineers make email accounts reappear in cPanel again.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.