Difference between revisions of "Mail server"

From CNM Wiki
Jump to: navigation, search
(Locations)
(Records)
Line 33: Line 33:
 
:#'''[[Mail transfer agent]]''' (also known as [[message transfer agent]] or by its acronym [[MTA]]), which is a [[computer application]] used to transfer [[email]]s between computers;
 
:#'''[[Mail transfer agent]]''' (also known as [[message transfer agent]] or by its acronym [[MTA]]), which is a [[computer application]] used to transfer [[email]]s between computers;
 
:#'''[[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 [[mail user agent|MUA]].
 
:#'''[[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 [[mail user agent|MUA]].
 
==Records==
 
:''Main wikipage: [[DNS record]]''
 
Several [[DNS record]]s are used to both evaluate sent mail and map mail transfers.
 
 
===A record===
 
:''Main wikipage: [[A record]]''
 
 
:[[Mail exchanger]]s look for [[A record]]s to locate the [[IPv4 address]] of the recipient's host device. An example of this record is<blockquote><code>mail.friendsofcnm.org. IN A 134.209.40.232</code></blockquote>
 
 
===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.
 
 
:''Main wikipage: [[A record]]''
 
 
:[[Mail exchanger]]s look for [[A record]]s to locate the [[IPv4 address]] of the recipient's host device. An example of this record is<blockquote><code>mail.friendsofcnm.org. 134.209.40.232</code></blockquote>
 
 
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 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 12:21, 22 June 2019

A mail server (hereinafter, the Server) is any digital construct that is located in a computer network under its distinguishable hostname in order to accept, analyze, adjust, and transfer electronic mail messages (or, simply, emails) from mail user agents (MUAs) to mail exchangers (MX hosts) and vice versa.

The Server can also refer to mail server software. More broadly, email software may refer to all the software utilized for MUAs, the Servers, or mail exchangers.


Features

Protocols

To communicate with:
  1. Mail exchangers, all the Servers use the Simple Mail Transfer Protocol (SMTP).
  2. Mail user agents (MUAs), the Servers use a variety of protocols, most commonly, POP3 and/or IMAP.

Functions

With regard to:
  • Outgoing messages, the Servers may be designed to:
    1. Accept messages from mail user agents.
    2. Analyze messages looking for their inconsistencies and/or missing data.
    3. Adjust messages while correcting inconsistencies and/or adding the missing data.
    4. Transfer messages to mail exchangers.
  • Incoming messages, the Servers may be designed to:
    1. Accept messages from mail exchangers.
    2. Analyze messages looking for their inconsistencies and/or missing data.
    3. Add information about the found inconsistencies and/or missing data to the messages.
    4. Transfer messages to mail user agents.

Hosting

Depending on their functionality, the Servers are hosted in two types of locations:

Agents

  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 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.

Best practices