Moving mail account from Server A to B but keep domain hosting on A

wdeboer

Verified User
Joined
Jul 16, 2005
Messages
40
I am currently planning to move over to my second webserver which usage Dovecot for the mailing part. Somehow the subfolders support is better then the old Exim software. Now I have made a mail account on my Server B which has a domain clients.company.com and on Server A I have a mail account as company.com both e-mail accounts currently.

Only I would like to rename clients.company.com to company.com on Server B and have all the email end up on Server B instead of Server A without moving the hosting to Server B too (well, that's my preference atm).

How can I move the mail delivery to Server B?


If it's needed, I wouldn't mind to change the whole hosting/domain to Server B. Only what's the best way to do this without loosing mail?
 
The easy way is to convert your first server to Dovecot. It's easy, and it's been covered in these forums several times. And you won't have to move any domains. You have to have lots of extra space in /home, though, as the new Dovecot/Maildir setup used in DirectAdmin keeps all email in /home, and doesn't use /var for email. This is also the easiest way to make sure you don't lose email.

The second easiest way is to first create new MX records with slightly higher cost pointing to the new server, shut down exim on the first server, then suspend the accounts, back them up using admin reseller backup, restore them on the new server (the restore will automatically convert them to Dovecot/Maildir). Then adjust DNS on the server you're going to use for your live DNS to point to the respective server for the respective services, especially remembering to turn off MX records pointing to the old server. Then unsuspend the accounts. Then turn exim back on on the old server. You'll get all email form the old server, and some to most of mail attempted while the account was being moved, though some may be returned to sender as undeliverable, and some may end up on the old server (your clients can log in with your webmail service on the old server to make sure they haven't lost any email). Unfortunately you have no control over this; it depends on how well sending MTAs handle mx lookups to servers and how they try reattempts.

You can (and possibly should) remove the webhosting directories from the new server, and possibly remove the mail stuff from the old server.

Jeff
 
Okay. I have converted my mailbox my copying the mails in Thunderbird to the IMAP account. I have lost a few mails but that's not a big issue. Only need to filter out the double ones. Because sometimes Thunderbird crashes halfway copying the files :(
 
Back
Top