Page 1 of 1
How to copy/move mails from cPanel to myVesta
Posted: Mon Jun 28, 2021 7:49 am
by T4B
hello how can move cpanel mails to vestacp webmail ?
Re: cpanel mail to vesta
Posted: Mon Jun 28, 2021 11:24 am
by myVesta
You can import the whole cpanel backup -
viewtopic.php?f=24&t=63
But there is another solution.
cPanel is using the same maildir format for emails, so you can even
create empty email accounts in myVesta (this is mandatory), and then simply copy those mail files from cPanel to myVesta server (destination folder will be:
/home/user/mail/domain.com/emailusername/ )
After that, just delete dovecot caching files:
In your SSH, as root, run:
For specific email accounts:
Code: Select all
sudo find /home/$user/mail/$domain/emailusername/ -type f -name 'dovecot*' -delete
For the whole domain:
Code: Select all
sudo find /home/$user/mail/$domain/ -type f -name 'dovecot*' -delete
Then restart dovecot:
At the end, you have to fix the permissions:
Code: Select all
user='myVestaUser'
find /home/$user/mail/ -type d -exec chown $user:mail {} \;
find /home/$user/mail/*/ -type d -exec chown $user:mail {} \;
find /home/$user/mail/*/ -type f -exec chown $user:mail {} \;
Instead of the user, insert the username of the account on which emails are located.
Re: cpanel mail to vesta
Posted: Mon Jun 28, 2021 6:46 pm
by T4B
Code: Select all
sudo find /home/user/mail/domaim.com/emailusername/ -type f -name 'dovecot*' -delete
sudo systemctl restart dovecot
this commands for myvestacp ?
Re: cpanel mail to vesta
Posted: Mon Jun 28, 2021 7:36 pm
by myVesta
Yes