/go/checkmx: checkmx from the Command Line

A domain needs an MX record in its DNS zone to receive email. /go/checkmx goes through every hosted domain and reports two problems: The command only reports. It does not change DNS. Use mx to add or fix a record. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

/go/checkmx

Options

None. Any arguments you pass are ignored. The command checks every folder in /home that has a www folder.

Examples

# Check all domains
/go/checkmx

# Look at a domain's MX records yourself
dig +noall +answer -t mx example.com

example.com. 3600 IN MX 10 mail.example.com.

In this example the single record has priority 10, so checkmx reports it.

Output

Each problem is printed on its own line, in red. The command prints nothing when all domains pass.

Message Meaning
No MX Record: Please add MX for domain <domain> The main domain has no MX record.
Invalid MX priority (<n>): Please change MX priority to 0 for domain <domain> The domain has one MX record, and its priority is <n> instead of 0 or 1.

Each run also adds a line to /var/log/go/checkmx.log.

See the full reference at /go/checkmx and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *