0

I'm moving my website to another domain on the same VPS. From olddomain.com to newdomain.com. I want to move all emails from hello@olddomain.com to piotr@newdomain.com

I'm looking for fast and possible costless way. I've found that on FTP there is imap folder which seems to contain all email accounts and messeges. And my question is: Can I just copy folder Maildir from imap/olddomain.com/hello/ to imap/newdomain.com/piotr/ ?

I've made test and copied Maildir. In mailbox I see all mails (marked as unread) but I'm not sure, taht everything is OK and in future everything will work fine.

On VPS I have Apache 2.4.41 server.

Piotr
  • 1

1 Answers1

1

This can't be answered definitively unless specifics of your servers are known.

Certainly it is likely to be possible if you are using something that writes in maildir format (1 file/email) - and you remember to ensure file perms are updated if necessary. I know that my Dovecot based multi-domain setup allows this.

Another (slow, bandwidth expensive) method would be to use an imapsync /IMAP copy programming to log into both servers and sync old one to new one. See https://github.com/imapsync/imapsync for one such implementation.

davidgo
  • 6,222
  • 3
  • 23
  • 41
  • I've just used Thunderbird to copy mails. But imapsync looks interesting and I will test it next time. Thanks, I didn't know it. – Piotr Mar 29 '20 at 10:08