Sentora Support Forums

Full Version: Trouble with changing passwords after migration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I have a bit of a complicated trouble.

I used to run zPanel on my old server. Then I switched servers and decided to install Sentora right away.
I migrated everything the slow way - move the files, fix ownership, fix permissions, dump database, reimport database after manually creating databases in the panel.

After that comes my problem.
For each account I have, I created email addresses. No problem there. Then I took the old /var/zpanel/vmail folders and moved them from my first server to my new one where appropriate.
I checked the ownership and permissions of everything, things there match perfectly.

Now on some accounts I can't change passwords or create new mailboxes. The new mailboxes I create do appear at the panel, but a /var/sentora/vmail folder isn't created for them.

What exactly can go wrong there? Did I miss something?
How you imported data? Did you import accounts configuration from zpanel to sentora?

M B
I created the mailboxes manually in Sentora. I matched the old usernames and passwords from zPanel because I have them.
Then I archived the old mailboxes from /var/zpanel/vmail and extracted them to /var/sentora/vmail.

Ownership of the files is correct, permissions are also correct. The mailboxes were created manually and only the files were moved.
vmail owner??? postfix?
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.
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
b) then you need to make sure sentora_core.x_mailboxes gets populated correct.
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 .
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.
After days of testing, this is not to be treated as a bug. It happens randomly. It got fixed without me doing anything.
I can recall having similar issues with changing zPanel passwords for accounts - again, randomly. And I mean whole accounts, not just emails.
I will perform some extended testing and report results if I achieve any logical way to recreate them.