---
name: "dnsmx"
section: "1"
platform: "linux"
package: "djbdns-utils"
version: "1:1.05-22"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dnsmx"
---

# dnsmx(1)

prints the MX records of fqdn

## NAME

dnsmx - prints the MX records of fqdn

## SYNOPSIS

**dnsmx** *fqdn*

## DESCRIPTION

**dnsmx** prints the MX records of *fqdn*. If there are no MX records, **dnsmx** prints an artificial MX record, simulating the behavior of MTAs.

Normally  **dnsmx** exits 0. If  **dnsmx** encounters a temporary problem that prevents it from determining the list of MX records, it prints an error message and exits 111.

## SEE ALSO

[dnsip(1)](/dnsip/1.md), [dnsname(1)](/dnsname/1.md), [dnsipq(1)](/dnsipq/1.md), [dnstxt(1)](/dnstxt/1.md), [dnsqr(1)](/dnsqr/1.md), [dnsq(1)](/dnsq/1.md), [dnstrace(1)](/dnstrace/1.md)

http://cr.yp.to/djbdns.html
