Install | Topics | Beyond Lino

Mail server basics

Concepts

Postfix

A well-known free MTA. There have been long debates on what (if any) should be the default MTA for a Debian system (more). We use Postfix for historical reasons.

Dovecot

An IMAP/POP3 server, which is needed if users of your server want to access their mails from your server using a mail client like Thunderbird.

Before installing Dovecot, you should have installed Postfix.

MTA

Mail Transfer Agent. The main component on a mail server.

mail server

A server that runs an MTA (mail transfer agent) like Postfix and is set up accordingly.

relay host

A mail server that accepts email messages from other mail servers and cares about delivering them to their final destination.

zone file

A file that defines your “DNS records”, which contain metadata about your domain name. It is stored at the provider of your domain.

SPF

Sender Policy Framework. See SPF.

DKIM

See DKIM (DomainKeys Identified Mail).

PTR record

A record where you tell the owner of an IP what domain name you configured to point to this IP. Also known as “reverse DNS”. See Set your PTR record for reverse DNS.

DMARC

Domain-based Message Authentication, Reporting and Conformance. DMARC builds upon both the DKIM and SPF specifications that are currently being developed within the IETF. See DMARC.

To relay or not to relay?

Using a relay host means to delegate all outgoing mail to a single third-party mail server that is specialized in talking to the mail servers of the recipients. This can make sense because talking with SMTP servers is a complex topic. In particular you need to explain them that you are not a spammer. Because these servers are of course very paranoid regarding spammers. Some examples of sender guidelines published by big mail service providers:

A relay host can be any third-party smtpd server as provided by Mailgun, SendGrid, AWS, Rackspace, Google, or your own ISP. Some providers offer a free relay host for the domain names they provide. Mailgun gives you 10000 free emails every month.

To run your mail server without a relay host, you need a static IP address and a fully qualified domain name pointing to it. There can be only one mail server per IP address.

DKIM (DomainKeys Identified Mail)

DKIM is an authentication mechanism for email that uses a “domain name identifier” and a DNS-based publishing service for the public key. We use it to avoid email spoofing and because otherwise our server would be suspected to send spam, which would cause delivery issues.

When using DKIM, Postfix is configured to sign every outgoing message content. The signature information is placed into a field of the message header. The receiving mail server can then validate the signature to check that our server took responsibility for the message.

Sources