How to copy/move mails from cPanel to myVesta
- myVesta
- Site Admin
- Posts: 949
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 9 times
- Been thanked: 6 times
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:
For the whole domain:
Then restart dovecot:
At the end, you have to fix the permissions:
Instead of the user, insert the username of the account on which emails are located.
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
user=''
domain=''
Code: Select all
sudo find /home/$user/mail/$domain/emailusername/ -type f -name 'dovecot*' -delete
Code: Select all
sudo find /home/$user/mail/$domain/ -type f -name 'dovecot*' -delete
Code: Select all
sudo systemctl restart dovecot
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 {} \;
- Attachments
-
- email-routing-2.png (21 KiB)
-
- email-routing-1.png (7.47 KiB)
Code: Select all
sudo find /home/user/mail/domaim.com/emailusername/ -type f -name 'dovecot*' -delete
sudo systemctl restart dovecot