The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Restoring mail

Discussion in 'E-mail Discussions' started by Wambat, May 13, 2013.

  1. Wambat

    Wambat Member

    Joined:
    May 10, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    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?
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    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.
     
  3. Wambat

    Wambat Member

    Joined:
    May 10, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    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?
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The passwd and shadow files, to add the entries that are currently missing.
     
  5. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    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?
     
  6. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page