0

I'm looking to move my clients websites from a reseller hosting plan to a VPS server so I can manage their resources according to their needs.

Everything has been smooth sailing until I forgot that a client has MX records pointing to their G Suite account on the old hosting account

How can I add MX records to my Centos system? Is this even possible or do I need a standalone DNS server to do this?

  • Does it have a hosting panel e.g. cpanel? – Steve Mar 25 '18 at 4:46
  • Forgot to add it doesn't have cpanel. Just barebones Linux. – Oliver K Mar 25 '18 at 4:47
1

Assuming you have bind installed, you add the record in the domain zone file which on a centos machine is in /var/named and is named example.com.db

Your MX record will look like this:

example.com. 3600    IN      MX      0       mail.example.com.

Don't forget you will also need an A record if you point MX to mail.example.com and it doesn't exist

 mail 3600    IN      A       12.34.56.78

You will then have to restart bind

# service named restart
  • Thanks Steve. This looks good; I'm guessing it wouldn't be as reliable as having an external DNS provider though - gonna keep my eyes peeled. – Oliver K Mar 25 '18 at 19:36
  • If you don't think your server is reliable, why would you pay for such a product? – Steve Mar 27 '18 at 6:01
  • No what i mean is if the server crashes and the DNS is installed on it, then the emails wont work which are hosted on external providers i.e. gmail because the server wouldnt have MX records available (cos its crashed) etc. – Oliver K Mar 28 '18 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.