Difference between revisions of "Mail exchanger"

From CNM Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
A [[mail exchanger]] (alternatively known as [[mail relay]], [[message exchanger]] or [[MX]], [[MX host]], and [[SMTP mail exchanger]]; hereinafter, the ''App'') is a [[computer application]] that locates [[DNS record]]s such as [[MX record]]s and use those in order to route [[email]]s.
+
A [[mail exchanger]] (alternatively known as [[mail relay]], [[message exchanger]] or [[MX]], [[MX host]], and [[SMTP mail exchanger]]; hereinafter, the ''App'') is a [[software application]] that locates [[DNS record]]s such as [[MX record]]s and use those records to route [[email]]s.
 +
 
 +
To communicate with [[mail transfer agent]]s, [[mail delivery agent]]s, and the other ''Apps'', the ''Apps'' use the [[Simple Mail Transfer Protocol]] ([[Simple Mail Transfer Protocol|SMTP]]).
  
  

Latest revision as of 16:03, 17 April 2020

A mail exchanger (alternatively known as mail relay, message exchanger or MX, MX host, and SMTP mail exchanger; hereinafter, the App) is a software application that locates DNS records such as MX records and use those records to route emails.

To communicate with mail transfer agents, mail delivery agents, and the other Apps, the Apps use the Simple Mail Transfer Protocol (SMTP).


Records

Main wikipage: DNS record

Several DNS records are used to both evaluate sent mail and map mail transfers.

A record

Main wikipage: A record
Mail exchangers look for A records to locate the IPv4 address of the recipient's host device. An example of this record is

mail.friendsofcnm.org. IN A 134.209.40.232

MX record

Main wikipage: MX record
Any MX record is the DNS record that identifies the server that handles email address for the hostname. MX is an abbreviation for mail exchanger.
Each MX record contains three pieces of information: the hostname, the priority, and the hostname of the mail server that handles mail for the host device. The sample of the MX record is as follows: friendsofcnm.org IN MX 10 friendsofcnm.org, where:
Sample code Field Description Values
friendsofcnm.org Labels One or more labels of the hostname and TLD name. Selected
IN Class The Internet or intranet; other options are all outdated. IN
MX Record MX stands for MX record and sets up the relationship between hostname labels and IP address Stable
10 Priority A numerical value that signifies the priority of this particular MX record and, consequently, for the mail server. The values used for this are only important if more than one mail server is used. The lower the value of the priority field, the higher the priority of the mail server. Assigned
mail.friendsofcnm.org Mail server hostname The hostname of the mail server that handles email for this domain. This hostname is a google address when Google Apps handle emails for this host device. Any mail server hostname should have a validly configured A record in order to receive emails smoothly. Assigned

TXT record

Main wikipage: TXT record
Any TXT record is a DNS record that allows for storage of human-readable and machine-readable texts that, if posted, would be assigned to a specific hostname.
With regard to machine-readable texts, TXT records may serve multiple purposes, including:
  • Sender policy framework (SPF) data storage. This data confirms the actual systems that are authorized to send mail on behalf of the given hostname. This is useful in the prevention of spam emails being sent with a forged sender address originating from the particular host device. RFC 4408 discourages this practice as "not optimal," however, because SPF now has its own DNS resource record type (code 99);
  • DomainKeys Identified Mail (DKIM) data. This data allows a receiving mail server to authenticate entities that have signed a specific email message. DKIM is similar to SPF in that it can help reduce spam email from containing forged email addresses originating from your domain, but it also contains a large amount of additional functionality.
Main wikipage: A record
Mail exchangers look for A records to locate the IPv4 address of the recipient's host device. An example of this record is

mail.friendsofcnm.org. 134.209.40.232

Setting up the MX record

c7Apht1[1]

(There is a ‘dot’ after the domain name) Setting up the SPF record

We create a new TXT record

"v=spf1 a mx ip4:1.2.3.4 -all"

cyFoSjh[1]

The SPF record protects from email spoofing. It will simply tell other mail servers that only our server is authorized to send emails for yourdomain.com (more aboutSPF). Setting up the DMARC record

We create a new TXT record named _dmarc.yourdomain.com. (There is a ‘dot’ after the domain name)

"v=DMARC1; p=quarantine; rua=mailto:postmaster@yourdomain.com"

Now we will setup the hostname for the PTR record

Gg6s1vv Our configuration should look similar to this

o1BA9Fy

It will take a while to propagate the new configuration throughout the entire internet.

PTR record

Main wikipage: PTR record
Any PTR record is a DNS record that translates a hostname into an IP address. PTR is an abbreviation for pointer; PTR records point to IP addresses. In comparison with A records, PTR records perform the exact opposite function.
PTR records use the following format: <IP address in a reverse order>.in-addr.arpa PTR <hostname>. For instance, 1.93.89.159.in-addr.apra PTR friendsofcnm.org, where:
Sample code Field Description Values
1.93.89.159 Reversed IP address The IP address of the location that the resulting hostname points to in a reverse order. The actual IP address used in this example is 159.89.93.1 Assigned
.in-addr.arpa Domain The domain name that historically arrived from the times when the Internet was called Arpa. In-addr is an abbreviation for internet address. No other options
PTR Record PTR stands for PTR record and sets up the relationship between IP address and hostname. Stable
friendsofcnm.org Hostname The hostname that points to the IP address. Selected
PTR records are needed for outgoing mail servers such as Postfix, because most of the mail providers reject or mark as spam messages received by mail servers without valid reverse dns configuration such as a missing PTR record or mismatch with an A record for the hostname.