Difference between revisions of "Mail server"

From CNM Wiki
Jump to: navigation, search
(Functions)
Line 13: Line 13:
 
===Functions===
 
===Functions===
 
:With regard to:
 
:With regard to:
:*'''Outgoing''' messages, the ''Servers'' may:
+
:*'''Outgoing''' messages, the ''Servers'' may be designed to:
 
:*#Accept messages from [[mail user agent]]s.
 
:*#Accept messages from [[mail user agent]]s.
 
:*#Analyze messages looking for their inconsistencies and/or missing data.
 
:*#Analyze messages looking for their inconsistencies and/or missing data.
 
:*#Adjust messages while correcting inconsistencies and/or adding the missing data.
 
:*#Adjust messages while correcting inconsistencies and/or adding the missing data.
 
:*#Transfer messages to [[mail exchanger]]s.
 
:*#Transfer messages to [[mail exchanger]]s.
 
  
 
===Locations===
 
===Locations===

Revision as of 16:43, 21 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.

Locations

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

Agents

Outgoing mail

  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;

Incoming mail

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


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.

Best practices