A mail server consists of multiple components. A mail transfer agent (MTA) receives and sends emails via SMTP. Received and accepted emails are then passed to a mail delivery agent (MDA), which stores the mail in a mailbox (usually in mbox or Maildir format). If you want users to be able to remotely access their mail using email clients (MUA), you need to run a POP3 and/or IMAP server.
+---------+ SMTP +---+ +---+ +----------------+ |Other MTA| <----> |MTA| --|MDA|-> Storage <-- |POP3/IMAP server| +---------+ +---+ +---+ +----------------+ ^ ^ | SMTP +---+ | +-------------|MUA|---------------+ +---+
All of these MTAs (except Sendmail) include a mail delivery agent (MDA).
- Exim — A highly configurable mail transfer agent.
- OpenSMTPD — A mail transfer agent, part of the OpenBSD project.
- Postfix — A mail transfer agent, meant to be fast, easy to administer, and secure.
- Sendmail — A well-known mail transfer agent.
- http://www.sendmail.org/ || AUR
- Courier — A mail transfer agent, providing POP3, IMAP, webmail and mailing list services as individual components.
- https://www.courier-mta.org/ || AUR
- Cyrus IMAP — A mail transfer agent with a custom mail spool format, provides POP3 and IMAP services.
- https://www.cyrusimap.org/ || AUR
- Dovecot — An IMAP and POP3 server written to be secure, fast and simple to set up.
- UW IMAP — An IMAP/POP server.
- fdm — A simple program for delivering and filtering mail.
- Procmail — A program for filtering, sorting and storing email (unmaintained).
- Maildrop — A mail filter/mail delivery agent used by the Courier Mail Server.
See also Wikipedia:Comparison of e-mail servers.
|Accept mail from other MTAs.||25||SMTP||STARTTLS|
|Accept submissions from MUAs.||587||SMTP||STARTTLS|
|Let MUAs access mail.||110||POP3||STARTTLS|
Hosting a mail server requires a domain name with an MX record pointing to the domain name of your mail transfer agent. The domain name used as the value of the MX record must map to at least one address record (A, AAAA) and must not have a CNAME record to conform with RFC 2181, otherwise you may not get mail from some mail servers. Configuring DNS records is usually done from the configuration interface of your domain name registrar.
To obtain a certificate, see OpenSSL#Usage.
There are various email authentication techniques.
Sender Policy Framework
- Sender Policy Framework (SPF) is an email validation protocol designed to detect and block email spoofing by providing a mechanism to allow receiving mail exchangers to verify that incoming mail from a domain comes from an IP Address authorized by that domain's administrators.
To allow other mail exchangers to validate mails apparently sent from your domain, you need to set a DNS TXT record as explained in the Wikipedia article (there is also an online wizard). To validate incoming mail using SPF you need to configure your mail transfer agent to use a SPF implementation. There are several SPF implementations available, , and can be found in the official repositories.
|Sendmail||through Milter and AUR|
The following websites let you validate your SPF record:
v=spf1 -allmakes any mail server enforcing SPF reject emails from your domain name, thus preventing misuse.
Sender Rewriting Scheme
DomainKeys Identified Mail (DKIM) is a domain-level email authentication method designed to detect email spoofing.
Available DKIM implementations are OpenDKIM and .
There are several handy web sites that can help you test DNS records, deliverability, and encryption support.
- https://www.mail-tester.com/ (3 free tries only!)
Tips and tricks
Most mail servers can be configured to strip users' IP addresses and user agents from outgoing mail.
Available extras that can usually be integrated are: