1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Exporting email accounts

Discussion in 'E-mail Discussions' started by bronwerkz, Sep 16, 2008.

  1. bronwerkz

    bronwerkz New Member

    Joined:
    Sep 16, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi there, I would like to find out how to export the whole mail account from a specific domain. Meaning

    abc.com > MAIL accounts > x@abc.com, r@abc.com, s@abc.com a@abc.com g@abc.com

    Exporting the full account info including the passwords.

    I want to migrate to another better cpanel based hosting but do not want users to go through the trouble of changing their mail passwords and settings of their mail clients. The mentioned account is an add on domain in cpanel.

    Anyone care to advice please? :D
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    If this is part of a migration process of moving an entire cPanel account from one server to another, just make a full site backup and have your new hosting provider restore this backup. This will back up all data (including email, email accounts, passwords etc.) and will make the migration to the new server very easy.
     
  3. bronwerkz

    bronwerkz New Member

    Joined:
    Sep 16, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hey david thank you for your reply but sadly no, this is not a full cpanel account migration. I just need to move one of the add on domain name under the main account to another shared hosting provider.

    Anyway i can do the mail account migration on the add on domain?
     
  4. cliffvt

    cliffvt New Member

    Joined:
    Apr 20, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Has anyone figured out how to do this? My cPanel host cannot help me and has told me to write a PHPscript... Nice one! I need to move email addresses, plus passwords etc. to a new server. Thanks!
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    You are just moving email accounts, not an entire cPanel account? Are you moving to another server running cPanel&WHM?
     
  6. cPanelJared

    cPanelJared cPanel Staff
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    Houston, TX
    E-mail account usernames and passwords are stored in files named passwd and shadow in the following directory structure:

    /$HOME/$USER/etc/$DOMAIN/

    where:

    • $HOME is the actual account home directory;
    • $USER is the cPanel account user, and;
    • $DOMAIN is the actual domain in question.
    Passwords are stored in shadow in this directory in salted MD5 format. There is no way to make them human-readable, but the file can be copied and the passwords will still work.

    The actual mailboxes are stored in the following format:

    /$HOME/$USER/mail/$DOMAIN/$MAILBOX

    where $MAILBOX is the name of the mailbox user as defined in cPanel. $MAILBOX is a directory containing all of the files related to the actual mail account data.

    You can copy the files and directories from the etc and mail directories from one cPanel account to another, or from one server to another. Make sure to apply the ownerships of the destination account to the files and directories. Also, make sure to move the following files out of the way before logging into cPanel on the destination account:

    /$HOME/$USER/.cpanel/email_accounts.cache
    /$HOME/$USER/.cpanel/email_accounts.yaml


    These files will automatically be created when you log into cPanel.
     
  7. .ARS.

    .ARS. New Member

    Joined:
    Mar 5, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    can you explain more details about this part?
     
  8. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    The files should be owned by username:mail for /$HOME/$USER/mail/$DOMAIN/$MAILBOX path, so something like:

    Code:
    cd /$HOME/$USER/mail/$DOMAIN/
    chown -R username:mail $MAILBOX
    Where /$HOME is where you have your /home directory (normally, this is just /home itself), $USER is the cPanel username, $DOMAIN is the domain name, and $MAILBOX is the email account username.
     

Share This Page