Use the commands mentioned below to test MX entries in Linux

Host -t mx example.com

host -t txt example.com