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.

Change domain primary, but email don't changed

Discussion in 'E-mail Discussions' started by sysber, Mar 17, 2015.

  1. sysber

    sysber Registered

    Joined:
    Nov 27, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    Had two domains on the server

    x.com (example)
    y.com (example)

    The x.com was the primary and had some email accounts created.

    But the client requested that the y.com become the main.

    What I did: removed the y.com it was like ... I was in secondary whm and changed the x.com to y.com. And added the secondary x.com (it was primary before)

    But the email accounts that had, are still created as x.com and were not changed for y.com.

    Know how I can fix this?

    Regards & Thanks
     
  2. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
  3. sysber

    sysber Registered

    Joined:
    Nov 27, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    The problem is to inform all users of the new password. That would be a very big impact, because the client has 80 email accounts.

    I found a solution by some local tests:

    I made a copy of the passwd file that is in the area that is now as secondary domain (home/xxxx/etc/x.com/ passwd)

    Changing only the destination directory that x.com file for y.com

    After copied the shadow file to the folder:

    /home/xxxx/etc/y.com/

    And did the copy of the mail directory:

    cp -r -p /home/xxxxx/mail/x.com/account1 /home/xxxxx/mail/y.com/

    Thus, it was possible to receive emails on new address (y.com) keeping the same password.

    I am testing in two e-mail initially and tests, everything is working fine.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page