Glossary

Email Server

An email server accepts, routes, stores and hands out email. It usually combines a transfer agent that speaks SMTP with a mailbox server that lets users read mail over IMAP.

What does an email server do?

It does four jobs. It accepts mail sent to your domains from the rest of the internet. It accepts mail from your own users and apps and sends it on to other domains. It stores messages in mailboxes. And it lets users read and manage those mailboxes from phones, desktop clients and webmail. Each job is a separate program on a typical Linux mail server, glued together by configuration.

What are the main components?

RoleProtocol and portCommon software
Mail transfer agent (MTA)SMTP on 25, submission on 587 and 465Postfix, Exim
Mailbox and delivery (MDA, IMAP)IMAP on 993Dovecot
Spam and virus filteringMilter or content filterRspamd, SpamAssassin, ClamAV
SigningDKIM headersRspamd, OpenDKIM
WebmailHTTPSRoundcube, SOGo

All-in-one bundles such as Mailcow, Mail-in-a-Box and iRedMail install and wire these together, which saves days of setup.

How does a message travel?

A user's client submits the message over port 587 with a login. The MTA checks the sender is allowed, signs the message with DKIM, looks up the MX record of the recipient's domain and connects to that server on port 25. The receiving MTA checks SPF, DKIM and DMARC, runs spam filters and, if all is well, hands the message to its mailbox store. The recipient's phone sees it over IMAP. Every hop is logged, which is where you look when a message goes missing.

Which DNS entries make mail for a domain work?

  • MX: points your domain at the mail server's host name.
  • A: the mail host name pointing at the server's IPv4 address.
  • SPF: a TXT record listing which servers may send for your domain.
  • DKIM: a TXT record with the public key matching the server's signing key.
  • DMARC: a TXT record telling receivers what to do when SPF and DKIM fail, and where to send reports.
  • PTR (reverse DNS): maps the IP address back to a name. Large mailbox providers check it on incoming connections.

The PTR record belongs to whoever controls the IP address, not your domain's DNS. Reverse DNS changes are not part of our service, so plan outbound delivery accordingly, as described below. You can check records with The dig command.

Can I self-host mail on a dedicated machine?

Inbound mail, mailbox storage, IMAP, webmail and filtering all run well on our hardware, and keeping mailboxes on your own machine gives you full control over storage and retention. For outbound delivery to large consumer mailbox services, which weigh reverse DNS and the sending address's history heavily, the dependable budget setup is to relay outgoing mail through a dedicated sending service (a smarthost). Postfix supports this with a few lines:

relayhost = [smtp.relay.example]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = lmdb:/etc/postfix/relay_auth
smtp_tls_security_level = encrypt

Your server still accepts and stores all mail; only the final outbound hop goes through the relay. Transactional mail from apps, such as password resets, usually follows the same path.

How much hardware does a mail server need?

Less CPU than most people expect, more storage than they expect. Filtering with Rspamd and ClamAV uses a few gigabytes of RAM; mailbox storage grows forever unless you set quotas. A team of fifty people with five-year archives can easily reach a few hundred gigabytes. An E2 with 32 GB DDR3 handles a small organization; S3 with 2x 1 TB NVMe leaves room for years of archives. Build a mirror across two drives yourself so one drive failure does not take mailboxes offline (Two-drive mirror (RAID 1)), and back up to a second machine (Backup server).

What keeps a mail server healthy?

Require TLS for submission and IMAP, use strong passwords plus fail2ban against login guessing (Set up fail2ban), keep the MTA from relaying for strangers, watch the mail queue with postqueue -p, and read DMARC reports weekly so you notice when someone spoofs your domain. Keep packages updated: mail servers are permanently exposed on port 25 and are scanned constantly.

Machines for Mailboxes and Filtering

ServerProcessorCores / threadsMemoryStorageNetworkPer monthSmallest order
E1Intel Xeon E3-1240 v34 / 816 GB DDR32x 240 GB SSD2x 1 Gbps$30.52$91.56 (3 months)
E2Intel Xeon E3-1270 v34 / 832 GB DDR31x 480 GB SSD2x 1 Gbps$38.32$114.96 (3 months)
S1Intel Xeon E-2276G6 / 1264 GB DDR41x 1 TB NVMe2x 10 Gbps$53.32$53.32 (1 month)
S3Intel Xeon E-2356G6 / 1264 GB DDR42x 1 TB NVMe2x 10 Gbps$80.38$80.38 (1 month)

Keep Reading

The dig command

Query DNS precisely with dig: record types, short answers, specific resolvers, full delegation traces, reverse lookups and DNSSEC checks.

Open

Set up fail2ban

Install fail2ban, write a jail.local for SSH and nginx, read the ban list and unban an address you locked out by mistake.

Open

Backup server

A machine whose job is to receive, keep and restore copies of other systems, and how to size one on budget bare metal.

Open

IPv4 on a /31

Why each machine gets one public IPv4 on a /31 network, how the two addresses split between gateway and server, and how to configure it.

Open

FAQ

Quick Answers

SMTP moves mail between servers and from clients to servers. IMAP lets a client read and organize mail stored on the server.

Postfix as the MTA and Dovecot for IMAP, often with Rspamd for spam filtering and Roundcube for webmail.

Reverse DNS changes are not offered. For outbound mail to large providers, relay through a dedicated sending service.

Yes. Receivers use them to judge whether mail from your domain is genuine, and missing records sharply lower delivery rates.

Yes for most teams. A few gigabytes of RAM covers Postfix, Dovecot and Rspamd, and antivirus scanning adds more.