Also see: How to Use an Outside Email Server, Types of DNS Records, and Editing DNS Settings
What is a mail
"Mail exchange" is just another name for the machine whose primary function is receiving and sending email. Also known as mailhost, mailhub, or even postoffice, this machine usually has a mail server (software written specifically for distributing files) listening on port 25 to receive incoming email.
What is a Mail Delivery
Agent? (How is email delivered?)
A Mail Delivery Agent (MDA) is the "postal worker" software that looks at the address and either drops it into the local user's mailbox or tosses it back on the "truck" for delivery elsewhere. In other words, the MDA reads the header and decides whether it needs to be put in a mailbox on its own machine or sent back out over the Internet to a remote machine.
an MX record?
An MX (Mail eXchange) record will redirect email sent to any user's machine (firstname.lastname@example.org for example) to a designated mailhost. It tells the MDA where to route email.
The MX record uses preference values to specify the routing order--low value = high priority. In the example below, when mail is sent to your-domain-here.net the MDA (see Mail Delivery Agent above) tries to reroute the mail to mailhost.dept1.your-domain-here.net which has the lowest value, and therefore the highest priority. If that fails, it tries mailhost2.your-domain-here.net and finally mailhost3.dept1.your-domain-here.net.
What is a "dangling"
An MX record can exist for a host that is not registered or no longer registered. For example, if people have become used to sending email to Joe at email@example.com, and the host mail2 dies or is decommissioned, Joe can still receive mail at his old address if you retain an MX record for mail2 that redirects the mail to a new address. We recommend this option be used sparingly because it may cause confusion in users who don't have understand how mail to a non-existant host can still be delivered.
is a domain MX record?
A domain MX record will redirect mail sent to firstname.lastname@example.org to a designated mailhost. The MX record is attached only to the domain name (your-domain-here.net). If a host exists with the same name as the domain, a "dangling" MX record is created which is not attached to any existing host. In either case, mail directed to the domain name is redirected to the mail exchange defined in the MX record. This does not effect mail sent directly to individual hosts in the domain.
For example, if a domain MX exists for your-domain-here.net, with a mail exchange of mailhost.your-domain-here.net, then mail to email@example.com will be delivered to firstname.lastname@example.org
What is a domain-wide MX record?
A domain-wide MX record gets attached to every registered host in the domain. This function allows mail to be delivered to a central mailhost when incorrectly configured hosts may direct the reply mail back to the local machine. Some administrators discourage the use of incoming sendmail service on individual machines as this has been historically a method for system compromise. Frequently, sendmail is turned off on individual machines and mail is redirected back to a more secure central mailhost. Since users may have published a local version of their email address, it is important to redirect the email to prevent a break in mail service.
For example, if a domain-wide MX record exists for your-domain-here.net, with a mail exchange of mailhost.your-domain-here.net, then mail to email@example.com will be delivered to firstname.lastname@example.org.