Best scenario to migrate emails from CWP to cPanel
Hello cPaneliens :)
Like the thread title
I've got a running Mail server on Centos7 with CWP (Centos Web Panel),
And now I've another server with cPanel/WHM, installed and Just created 1 account to move the emails on it and delete the CWP server
So, yesterday, I've created all emails on cPanel, and since CWP using the same mail structure, I've used rSync to move all mail directories from CWP at:
/var/vmail/domainx.com
to the cPanel account at:
/home/domainx/mail
So, all email directories moved correctly and I've fixed the [COLOR=rgb(226, 80, 65)]permissions and [COLOR=rgb(226, 80, 65)]ownership using WHM -> Repair Mailbox Permissions & chown command to match the cPanel mail folder ownership / Permissions
and when i tried to access any of the mails in cPanel, in the login screen, when I click login, it keeps loading and doing nothing!
and I've noticed one of the emails, in webmail Splash screens, the mail size section at the top right was about 300kb / 1024MB and that was not that mail actual size in CWP
So, moving mail dir from CWP to cPanel didn't work as expected, and I didn't watch the mail log to see what's the issue of the loading in login screen or accessing Roundcube from the welcome splash screen
for that, I've removed the cPanel account and created a new one, and I wanna migrate emails again,
So, should i do it again using rSync, with your instructions how to do it correctly this time
[CODE=bash]rsync -avhW --no-compress --links --progress /var/vmail/domainx.com root@123.456.789.0:/home/domainx/mail
or is there another idea to do it, And if you asking why I'm not using IMAPsync, the answer is: I need to change all emails passwords on CWP to be able to do it, and i can't do it because users are working on it. What i think about is, using rSync, move all current emails history files to cPanel, get the encrypted email passwords from CWP MySQL Postfix DB, and put it in the shadow folder for every email ( i know how to make it work ), then Change DNS records to point to the New server IP address, So all users won't know that migration happened !, No down time for emails [COLOR=rgb(226, 80, 65)]So, again, how to make it work this time using rSync ? or do you have another suggestion/ idea ? Sorry for the long explanation. Thanks.
or is there another idea to do it, And if you asking why I'm not using IMAPsync, the answer is: I need to change all emails passwords on CWP to be able to do it, and i can't do it because users are working on it. What i think about is, using rSync, move all current emails history files to cPanel, get the encrypted email passwords from CWP MySQL Postfix DB, and put it in the shadow folder for every email ( i know how to make it work ), then Change DNS records to point to the New server IP address, So all users won't know that migration happened !, No down time for emails [COLOR=rgb(226, 80, 65)]So, again, how to make it work this time using rSync ? or do you have another suggestion/ idea ? Sorry for the long explanation. Thanks.
-
Well it depends on in what format CWP stores the emails. It is possible that they are in a different format and that's the reason when you move over them manually then RoundCube is having issues displaying them. 0 -
Hello Thanks for your replies like i said mail structure are the same, they are maildir both of them I've found the issue, the issue in the main directory that hold all mail files have the source owner:group and permission, and " Repair Mailbox Permissions " option in WHM can't edit permissions of the domain directory in mail folder /home/accountname/mail/[COLOR=rgb(226, 80, 65)]domain.com/email1 --< directory in red color so emails are open correctly in cPanel now,[COLOR=rgb(226, 80, 65)] but new issues appears now, all email sizes shows in cPanel and in Roundcube as 0 KB/1GB, while all email have different sizes - screenshot attached -10-14 205704.png">74085 and cPanel, keeps the usage sizes as the dafults when created [COLOR=rgb(226, 80, 65)]So how to force refresh email size with the actual size a nissue, we had folders inside some emails (with Arabic names) in source, and they moved to cPanel, but with weird characters like screenshot -10-14 204948.png">74081 [COLOR=rgb(226, 80, 65)]So, is there any way to fix the Arabic characters in folders ? note: inside emails itself it have Arabic subject normally, and arabic body working ---- Update 1: Regarding Actual usage of mail sizes After a quick troubleshooting ,I've found that inside the email directory there's a file name: maildirsize that file holds the mail actual usage size so I've deleted it in all emails using this code while i'm in /mail/domain.com directory [CODE=bash]find . -name maildirsize -type f -delete
this code will delete maildirsize in all subdirectories ( emails ) then when re-login to the email again, it will create the same file with the correct usage size So now Mail size issue Fixed, still with the Arabic folders names issue ---- Update 2 regarding Arabic Named folders attached a screenshot, from the CWP email folders on the left, and on the right is cPanel email folders this folders should be arabic names in CWP server Arabic folders names is read correctly inside email, in cPanel the same email shows the same exact name as shown in SFTP --- I've tried to create a new email arabic named folder in roundcube, and checked the SFTP to the email folders, i've found that cPanel is putting the same exact folder name in arabic, not like CWP! So, do you think the issue is from the source ( CWP ) and how it handle arabic named folders ? So i think the issue on cPanel or something related to characters encoding, Any ideas ?0 -
@cPRex Hello Checked and it's enabled 0 -
Interesting - I'm not sure what else would cause that behavior. Could you create a ticket with our team so we can do some deeper investigation into this? 0 -
Interesting - I'm not sure what else would cause that behavior. Could you create a ticket with our team so we can do some deeper investigation into this?
Sure, but let me think with you about : in cPanel, if i created arabic name folder in mail, it will create an arabic directory in the mail directory in CWP, if i created arabic name folder in mail, it will create that directory named".&BjkGJwZF- - &BiMGLgYx-" in mail directory So, maybe CWP didn't handle UTF-8 correctly in the first place, and cPanel acts normally when i migrate email folders, so with a directory named ".&BjkGJwZF- - &BiMGLgYx-" then it will show it with same name, because cPanel set's UTF-8 Correctly, so this directory named: ".&BjkGJwZF- - &BiMGLgYx-" is a real name for cPanel/roundcube !! think about it !0 -
That is another possible option for sure! 0
Please sign in to leave a comment.
Comments
8 comments