RE: Trouble with changing passwords after migration
12-05-2014, 12:29 AM
(This post was last modified: 12-05-2014, 12:32 AM by j.waibel.)
Transfering the files and importing the data is not enough.
Here is what i did to manual port from zpanel to sentora for mailbox users.
This requires some steps in order. Without that you will not have complete mail accounts on the sentora server:
1) create the user account and the domain on the new server.
2) transfer the mail account info.
a)
on zpanel i only had mailbox info in the zpanel_postfix.mailbox database. the info here can be exported with mysqldump and you can reimport that to sentora_postfix.mailbox after you removed the ID field with 0 for all records.
b) then you need to make sure sentora_core.x_mailboxes gets populated correct.
here is a set of needed values
Here the field mb_acc_fk needs to hold the id of the related user account. sentora_core.x_accounts.ac_id_pk
After the database table sentora_core.x_mailboxes is proberly fileld you will see the email addresses in the admin panel of the related user.
3) Now all you need to do is to transfer the old email folders to the new server.
goto your virtual domain folder. and the copy the files with rysnc from the old to the new server
then in my case i just issued:
This will transfers all mails for the domain to the current folder.
After that is done you can login to webmail to check if everything been transfered.
J
------------
NOTE: regarding your question why you not see mailboxes created:
When you create a mail account in the sentora panel the files in the maildir structure is not created until you log into the account once. The creation of the maildir structure is handled by dovecot tools and not by the sentora panel.
Here is what i did to manual port from zpanel to sentora for mailbox users.
This requires some steps in order. Without that you will not have complete mail accounts on the sentora server:
1) create the user account and the domain on the new server.
2) transfer the mail account info.
a)
on zpanel i only had mailbox info in the zpanel_postfix.mailbox database. the info here can be exported with mysqldump and you can reimport that to sentora_postfix.mailbox after you removed the ID field with 0 for all records.
Code:
Example:
|<username>@<domain.name> | {PLAIN-MD5}7fa621f6a3791825978b8e34f9bf573a | <username> | <domain.name>/<username>/ | 200 | <username> | <domain.name> | 2014-12-02 15:46:14 | 2014-12-03 12:5
here is a set of needed values
Code:
| mb_id_pk | mb_acc_fk | mb_address_vc | mb_enabled_in | mb_created_ts | mb_deleted_ts |
0 | 1 | <username>@<domain.name> | 1 | 1417531574 | NULL |
Here the field mb_acc_fk needs to hold the id of the related user account. sentora_core.x_accounts.ac_id_pk
After the database table sentora_core.x_mailboxes is proberly fileld you will see the email addresses in the admin panel of the related user.
3) Now all you need to do is to transfer the old email folders to the new server.
goto your virtual domain folder. and the copy the files with rysnc from the old to the new server
Code:
cd /var/sentora/vmail/<domain.name> (or whatever you use for your virtual mail folders)
then in my case i just issued:
Code:
rsync -va root@old-mailserver-name:/var/zpanel/vmail/<domain.name>/ .
chown -R vmail.mail .
After that is done you can login to webmail to check if everything been transfered.
J
------------
NOTE: regarding your question why you not see mailboxes created:
When you create a mail account in the sentora panel the files in the maildir structure is not created until you log into the account once. The creation of the maildir structure is handled by dovecot tools and not by the sentora panel.