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.