MX trouble - move domain to new server - but keep mail on old

CentOS 6.10

Well, I use Webmin since 1978 or so, but I am just a user, so I put myself a beginner here.

I did move one website from CentOS (with Virtualmin) to a Debian10 server (no Virtualmin) - but I like to keep the old mail server on CentOS.

I use Cloudflare too. For SSL I use Letsencrypt.

Website runs fine. But email makes problems.

In cloudflare I set the A records for the domain to 222.222.222.222
Then I did an A record for MX to 111.111.111.111

It looks like the system always tries the 222 IP and mail never gets lost somewhere.

Is there any setting I can use to keep the email server on the old server? Or any workaround to make it work?

New server is typical naked nginx stack

To keep mail on old server, you must set the following DNS records:
mail.website.tld - IP of old server
MX of website.tld will be mail.website.tld

To host website on new server, you must set the following DNS records:
website.tld IP of new server
www.website.tld IP of new server

That’s all there is to it.

2 Likes

It worked. Thank you!

Damn, I feel so silly now :wink:

@calport great reply man!

@flameproof don’t you feel silly, its normal, heck I am using tmux (some great open source program) for about 6th year of my life and just today I discovered that I can do nested tmux, image me how stupid we humans can feels :grinning: I would wish I knew this it supports nested features 6 years ago,I would be light years advanced to use this. In end of day, its great you’ve asked.when on forums put feelings aside. :+1:t2:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.