Difference between revisions of "Mail server"

From CNM Wiki
Jump to: navigation, search
(Records)
(Records)
Line 26: Line 26:
 
==Records==
 
==Records==
 
:''Main wikipage: [[DNS record]]''
 
:''Main wikipage: [[DNS record]]''
 +
 +
===A record===
 +
:''Main wikipage: [[A record]]''
 +
 +
:Any [[A record]] is the [[DNS record]] that translates a [[hostname]] into an [[IPv4 address]]. In other words, [[A record]]s set up relationships between:
 +
:#[[Hostname]]s, which are human-friendly names, and
 +
:#[[IPv4 address]]es, which are [[IP address]]es expressed using the [[IPv4]] standard.
 +
 +
:A [[PTR record]] can set up the opposite relationship. The sample of the [[A record]] is as follows: <code>friendsofcnm.org IN A 159.89.93.1</code>, where:
 +
:{|class="wikitable" width=100%
 +
!Sample&nbsp;code
 +
|style="text-align:center;"|Field
 +
!Description!!Values
 +
|-
 +
|style="background-color:#fff;"|<code>friendsofcnm.org</code>
 +
!Labels
 +
|One or more labels of the [[hostname]] and [[TLD]] name.||Selected
 +
|-
 +
|style="background-color:#fff;"|<code>IN</code>
 +
!Class
 +
|The [[Internet]] or [[intranet]]; other options are all outdated.||IN
 +
|-
 +
|style="background-color:#fff;"|<code>A</code>
 +
![[DNS record|Record]]
 +
|''A'' stands for [[A record]] and sets up the relationship between hostname labels and [[IP address]]||Stable
 +
|-
 +
|style="background-color:#fff;"|<code>159.89.93.1</code>
 +
![[IPv4 address]]
 +
|The location that the resulting [[hostname]] points to.||Assigned
 +
|}
 +
 +
===AAAA record===
 +
:''Main wikipage: [[AAAA record]]''
 +
 +
:Any [[AAAA record]] is the [[DNS record]] that sets up a relationship between:
 +
:#A [[hostname]], which is a human-friendly name, and
 +
:#An [[IPv6 address]], which is an [[IP address]] expressed using the [[IPv6]] standard.
 +
 +
:[[AAAA record]]s are similar to [[A record]]s. The only difference is that [[A record]]s point to [[IPv4 address]]es and [[AAAA record]]s do to [[IPv6 address]]es.
 +
 +
===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: <code>friendsofcnm.org IN MX 10 friendsofcnm.org</code>, where:
 +
:{|class="wikitable" width=100%
 +
!Sample&nbsp;code
 +
|style="text-align:center;"|Field
 +
!Description!!Values
 +
|-
 +
|style="background-color:#fff;"|<code>friendsofcnm.org</code>
 +
!Labels
 +
|One or more labels of the [[hostname]] and [[TLD]] name.||Selected
 +
|-
 +
|style="background-color:#fff;"|<code>IN</code>
 +
!Class
 +
|The [[Internet]] or [[intranet]]; other options are all outdated.||IN
 +
|-
 +
|style="background-color:#fff;"|<code>MX</code>
 +
![[MX record|Record]]
 +
|''MX'' stands for [[MX record]] and sets up the relationship between hostname labels and [[IP address]]||Stable
 +
|-
 +
|style="background-color:#fff;"|<code>10</code>
 +
!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
 +
|-
 +
|style="background-color:#fff;"|<code>mail.friendsofcnm.org</code>
 +
!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 record]]s 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.
 +
 +
===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 record]]s ''point'' to [[IP address]]es. In comparison with [[A record]]s, [[PTR record]]s perform the exact opposite function.
 +
 +
:[[PTR record]]s use the following format: <code><IP address in a reverse order>.in-addr.arpa PTR <hostname></code>. For instance, <code>1.93.89.159.in-addr.apra PTR friendsofcnm.org</code>, where:
 +
:{|class="wikitable" width=100%
 +
!Sample&nbsp;code
 +
|style="text-align:center;"|Field
 +
!Description!!Values
 +
|-
 +
|style="background-color:#fff;"|<code>1.93.89.159</code>
 +
!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 <code>159.89.93.1</code>||Assigned
 +
|-
 +
|style="background-color:#fff;"|<code>.in-addr.arpa</code>
 +
!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
 +
|-
 +
|style="background-color:#fff;"|<code>PTR</code>
 +
![[PTR record|Record]]
 +
|''PTR'' stands for [[PTR record]] and sets up the relationship between [[IP address]] and [[hostname]].||Stable
 +
|-
 +
|style="background-color:#fff;"|<code>friendsofcnm.org</code>
 +
![[Hostname]]
 +
|The [[hostname]] that points to the [[IP address]].||Selected
 +
|}
 +
 +
:[[PTR record]]s 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]].
  
 
==Best practices==
 
==Best practices==

Revision as of 16:18, 20 June 2019

A mail server (hereinafter, the Server) is any software instance that transfers electronic mail messages from or to other Servers most commonly using the Simple Mail Transfer Protocol (SMTP) or its modifications. The Servers may also take the messages from sender's mail user agents (MUAs) and deliver those to recipient's MUAs, usually, using POP3 and/or IMAP protocols.

The Server can also refer to mail server software. More broadly, email software refers to all the software utilized for both the Server and MUAs.


Features

Functions

The Server may be one or more of the following:
  1. Mail submission agent (also known as outgoing mail server, message submission agent or by its acronym MSA), which is a computer application used to accept, analyze, correct, and send emails that end-users enter into their MUAs;
  2. Mail transfer agent (also known as message transfer agent or by its acronym MTA), which is a computer application used to transfer emails between computers;
  3. Mail exchanger (also known as mail relay, message exchanger or MX, and MX host), which is a computer application that locates DNS records such as MX records and use those in order to route emails;
  4. Mail delivery agent (also known as incoming mail server, message delivery agent or by its acronym MDA), which is a computer application used to deliver an email to its recipient's MUA.

Process model

The following model illustrates the process of electronic mail message transfer:
  1. A common sender enters some electronic mail message to his or her MUA;
  2. The MUA transfers the message to a mail submission agent;
  3. The mail submission agent transfers the message to a mail exchanger;
  4. The mail exchanger finds the location of recipient's mail delivery agent in order to transfer the message to this agent directly or through those mail exchangers that communicate with the recipient's mail delivery agent;
  5. The mail delivery agent transfers the message to receiver's MUA or MUAs;
  6. The recipient now is able to read the message and send the response.

Locations

Internet service providers (ISPs) tend to run mail exchangers, while mail submission, mail transfer, and mail delivery agents are usually hosted by local computing devices that are connected to the Internet.

Records

Main wikipage: DNS record

A record

Main wikipage: A record
Any A record is the DNS record that translates a hostname into an IPv4 address. In other words, A records set up relationships between:
  1. Hostnames, which are human-friendly names, and
  2. IPv4 addresses, which are IP addresses expressed using the IPv4 standard.
A PTR record can set up the opposite relationship. The sample of the A record is as follows: friendsofcnm.org IN A 159.89.93.1, 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
A Record A stands for A record and sets up the relationship between hostname labels and IP address Stable
159.89.93.1 IPv4 address The location that the resulting hostname points to. Assigned

AAAA record

Main wikipage: AAAA record
Any AAAA record is the DNS record that sets up a relationship between:
  1. A hostname, which is a human-friendly name, and
  2. An IPv6 address, which is an IP address expressed using the IPv6 standard.
AAAA records are similar to A records. The only difference is that A records point to IPv4 addresses and AAAA records do to IPv6 addresses.

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.

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.

Best practices