+44 151 528 8706 [email protected]

Email accounts missing from cpanel

 

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.

 

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.

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

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.

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.

How to Mount an NFS Share in Linux

Network File System (NFS) is a distributed file system protocol that allows you to share remote directories over a network. With NFS, you can mount...

How to install Plesk on CentOS

Plesk is a commercial web hosting and server data center automation software with a control panel developed for Linux and Windows-based retail hosting...

Plesk vs cPanel

When choosing between web hosting control panels, it’s often a toss-up between Plesk or cPanel. Between them, they dominate the market for users looking for account and server...

We're Here To Help!

9 + 6 =

Head Office

Ukshin Kovaçica, 10,000 Pristina, Republic of Kosovo

Call Us

+44 151 528 8706