Wambat

Member
May 10, 2013
9
0
1
cPanel Access Level
Reseller Owner
I have copied all the mail folder from a Full Backup into a newly created account with the same name as the original account, but when I look in cPanel/Mail it says No Accounts Found.

I've googled and searched the forums, and everything just seems to say to copy the directory and make sure the permissions are correct. I set the mail directory to 751. I do not have shell access. How can I check the owner of the mail directory?
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
Did you also copy the contents of the account's etc directory? mail only contains the actual mailboxes. The authentication data are in etc. No accounts will be listed in cPanel, and the accounts will not work, if they do not exist in etc.

The etc directory contains a passwd and shadow file for each domain. passwd is what contains the usernames, and shadow contains the actual password hashes.

Since you already copied the mail directory, the easiest thing to do is just create the mailboxes again in cPanel. That will create the necessary entries in passwd and shadow with no need to copy or edit files manually.
 

Wambat

Member
May 10, 2013
9
0
1
cPanel Access Level
Reseller Owner
Did you also copy the contents of the account's etc directory? mail only contains the actual mailboxes. The authentication data are in etc. No accounts will be listed in cPanel, and the accounts will not work, if they do not exist in etc.

The etc directory contains a passwd and shadow file for each domain. passwd is what contains the usernames, and shadow contains the actual password hashes.
Many thanks.. I did not know about the etc directory.

You also said "Since you already copied the mail directory, the easiest thing to do is just create the mailboxes again in cPanel. That will create the necessary entries in passwd and shadow with no need to copy or edit files manually."

What files would I be editing manually and why?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,903
467
438
Finland
cPanel Access Level
Root Administrator
The passwd and shadow files, to add the entries that are currently missing.

I understood that if the OP creates the mailboxes in cPanel they don't have to edit any files manually?
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
I understood that if the OP creates the mailboxes in cPanel they don't have to edit any files manually?
Yes. He can either:

  • Copy the entries from passwd and shadow, or copy the entire files, from the original server,

    or

  • Simply create the mailboxes again in cPanel.

I apologize if I was not clear enough, but I provided two possible ways to solve the same problem that are not contradictory. Creating the mailboxes in cPanel presents less risk of accidentally damaging the existing files, but one could also copy the entries or the entire files manually.