How to move mails to another email account in same cPanel?

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
44
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
You could do:

Code:
cp -R /home/username/mail/mydomain.com/abc/{cur,new}/ /home/username/mail/mydomain.com/xyz/
Above please replace username with the cPanel username, mydomain.com with the domain name, abc with the old email user's name, and xyz with the new email user's name. This will copy the cur and new folders on the abc account to that xyz account. Since maildir formats have each email individually named, this shouldn't overwrite any emails on the new account.

Of note, you might want to backup the mail folder before doing the above:

Code:
cp -R /home/username/mail /home/username/mail.bak
Again, please replace username with the cPanel username for the account.
 

.ARS.

Member
Mar 5, 2011
5
0
51
thanks for replying.

but sorry, I'm newbie on cPanel, where the commands should be executed? or I can do it manually from file manager?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
44
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you do not have access to root SSH to run the commands, then this isn't possible to perform the commands indicated. You'd instead have to copy the files manually at the location noted (mail/mydomain.com/abc/cur to mail/mydomain.com/xyz/cur). If you have FTP access to the account, FTP would be far faster to copy the files.