Skip to content

Tutorial · Debian 12, Debian 13, Ubuntu 24.04

Email server VPS setup: Postfix and Dovecot, step by step, on a server paid in Monero

Set up a mail server that sends and receives for your own domain on a VPS paid only in crypto: Postfix, Dovecot 2.3 or 2.4, a Let's Encrypt certificate that reloads itself, SPF, DKIM, DMARC, tests and backups. Every command follows the official documentation of each program, read on 18 November 2026.

Updated By Nymhost LLC23 min read

What you build

An email server on a VPS is Postfix to send and receive, Dovecot to serve your mailboxes over IMAP, a TLS certificate, and DNS records: A, MX, SPF, DKIM and DMARC, plus a reverse DNS (PTR) entry for the IP address. This guide covers Debian 12, Debian 13 and Ubuntu 24.04. Debian 13 ships Dovecot 2.4, whose configuration differs from 2.3, so both files are given. Outbound port 25 is open on every Nymhost VPS. Spam is forbidden, and no plan includes backups, so the guide ends with a backup routine you run yourself.

Email server on a VPS: what you build and what you need

Before you start, check that you have:

  • a domain whose DNS you can edit (the examples use example.com and the documentation address 203.0.113.10);
  • a VPS with a dedicated IPv4 address and root access over SSH;
  • outbound port 25 open, which it is on every Nymhost VPS (how to test that port 25 is open);
  • an afternoon, and the habit of reading logs.

Mail moves through the server along three paths:

  • Your mail client → port 587 → Postfix → the internet. You log in (SMTP submission with STARTTLS), and Postfix delivers to the recipient's server on port 25.
  • The internet → port 25 → Postfix → ~/Maildir. Other servers deliver to you, and Postfix writes each message into the user's Maildir folder.
  • Your mail client → port 993 (IMAPS) → Dovecot → ~/Maildir. Dovecot serves the same folder over IMAP, and it also checks passwords for Postfix.

This VPS mail server setup sticks to Postfix and Dovecot with system users, which is enough for a household or a small team. It leaves out webmail, virus scanning and virtual users; the maintenance section says where to go next. If the server only needs to send (alerts, a website, an application), a send-only Postfix is simpler.

For the plan, Offshore 2 (1 vCPU, 2 GB RAM, 40 GB NVMe, $4.89 a month) is a comfortable start for a few mailboxes. To compare plans and read the port 25 and IP reputation notes first, see which VPS for a mail server.

Debian 12, Debian 13 or Ubuntu 24.04: which Dovecot version you get

To set up a mail server on a VPS from a configuration you copied elsewhere, check the Dovecot version first. The system decides it, and Dovecot 2.4 does not accept a 2.3 configuration file. The table lists what each system installs today.

For a new server, take Debian 13 and the Dovecot 2.4 file. Take Debian 12 or Ubuntu 24.04 if you are moving an existing 2.3 configuration and want it to keep working as it is. Ubuntu 22.04, also offered on Nymhost, has Dovecot 2.3.16 and uses the 2.3 file too.

Package versions in each system's archive, including security updates (amd64), read on 18 November 2026 on packages.debian.org and packages.ubuntu.com. Distribution revision suffixes left out.
SystemPostfixDovecotOpenDKIMDovecot file in this guide
Debian 12 (bookworm)3.7.112.3.19.12.11.0~beta2Dovecot 2.3
Debian 13 (trixie)3.10.132.4.12.11.0~beta2Dovecot 2.4
Ubuntu 24.04 LTS (noble)3.8.62.3.212.11.0~beta2Dovecot 2.3
Ubuntu 22.04 LTS (jammy)3.6.42.3.162.11.0~beta2Dovecot 2.3

Nymhost also offers AlmaLinux 10 and Rocky Linux 10, which this guide does not cover.

Step 1: hostname, DNS records and firewall

Every VPS email server setup starts with names and ports, because Let's Encrypt, receiving servers and your mail clients all look the server up by name. Run every command in this guide as root.

Set the hostname to mail.example.com; with hostnamectl hostname and a name, it changes the static, pretty and transient hostnames together. Then publish the records in the table at your DNS host. The A record must resolve before Step 2, because Certbot checks it. The DKIM record comes in Step 6.

Each Nymhost VPS also has a routed IPv6 /64. If you configure an IPv6 address on the server and want mail to flow over IPv6, publish an AAAA record for mail.example.com, add an ip6: term to SPF, and ask for reverse DNS on that address as well. Otherwise publish no AAAA record for the mail host; Step 3 keeps Postfix on IPv4.

The firewall below opens 25 (mail from other servers), 80 (certificate issue and renewal, keep it open), 587 (submission) and 993 (IMAPS); 465 and 143 stay closed unless a client needs them. Allow SSH first, on your real SSH port: the ufw manual warns that ufw enable may drop existing connections.

Set the hostname, then print it
hostnamectl hostname mail.example.com
hostnamectl hostname
Records to publish before you install anything. Example domain and documentation IP address; SPF syntax from RFC 7208 and DMARC from RFC 9989, both read 18 November 2026.
RecordNameValueWhen
Amail.example.com203.0.113.10Now, before Step 2
MXexample.com10 mail.example.com.Now
TXT (SPF)example.comv=spf1 mx -allNow
TXT (DMARC)_dmarc.example.comv=DMARC1; p=none; rua=mailto:[email protected]Now, in monitoring mode
TXT (DKIM)mail._domainkey.example.comv=DKIM1; k=rsa; p=… (from Step 6)Step 6
PTR10.113.0.203.in-addr.arpamail.example.com.Ask support, see below
Open the ports with ufw (SSH first)
apt update
apt install -y ufw
ufw allow 22/tcp
ufw allow proto tcp from any to any port 25,80,587,993
ufw enable
ufw status verbose

Step 2: get a TLS certificate and reload it automatically

Postfix and Dovecot both need a certificate for mail.example.com. Certbot's standalone mode binds port 80 to prove you control the name, so nothing else may listen on port 80 at that moment. If a web server already runs on the VPS, use Certbot's webroot plugin instead (certbot certonly --webroot -w /var/www/html -d mail.example.com, with your own web root).

The files land in /etc/letsencrypt/live/mail.example.com/: fullchain.pem (certificate and chain) and privkey.pem (the private key, which must stay secret). Certbot's guide asks you to point services at these paths rather than copy the files.

Renewal is usually automatic: Certbot's guide says most installations schedule certbot renew, and systemctl list-timers shows the timer. The step people forget is the reload. Postfix and Dovecot load the certificate when they start or reload, and Certbot runs every executable file in /etc/letsencrypt/renewal-hooks/deploy/ after a successful renewal, so the script below reloads both. A certbot renew --dry-run does not run deploy hooks unless asked to, so run the script once by hand at the end of Step 4.

Install Certbot and request the certificate (standalone mode)
apt install -y certbot
certbot certonly --standalone -d mail.example.com
certbot certificates
Reload Postfix and Dovecot after each renewal
mkdir -p /etc/letsencrypt/renewal-hooks/deploy
cat > /etc/letsencrypt/renewal-hooks/deploy/reload-mail.sh <<'EOF'
#!/bin/sh
systemctl reload postfix dovecot
EOF
chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload-mail.sh
certbot renew --dry-run
systemctl list-timers

Step 3: configure Postfix (receive on 25, submit on 587)

Install Postfix. When the installer asks, choose Internet Site and enter example.com as the system mail name. Then set main.cf with postconf -e, which edits the file for you. What the settings do:

  • myhostname, myorigin and mydestination: the server's name, the domain that local mail is sent from, and the names it accepts mail for, as in Postfix's basic configuration guide.
  • inet_protocols = ipv4: send and receive over IPv4 only, the address your PTR and SPF cover. Remove it once IPv6 has its own PTR and SPF entry. Postfix must be stopped and started after this change, not just reloaded.
  • home_mailbox = Maildir/: deliver into ~/Maildir/, where Dovecot will look.
  • smtpd_tls_chain_files: the private key, then the certificate chain. Postfix's TLS guide prefers this setting from Postfix 3.4 on (every system here has 3.6 or later). When it is set, the old smtpd_tls_cert_file and smtpd_tls_key_file are ignored with a warning, so the second line empties them.
  • smtpd_tls_auth_only = yes: no password is accepted over an unencrypted connection.
  • smtpd_sasl_type = dovecot and smtpd_sasl_path = private/auth: Postfix asks Dovecot to check passwords through a socket. The path is relative to the Postfix queue directory, so it works whether or not Postfix runs chrooted, as it does by default on Debian and Ubuntu.
  • smtpd_relay_restrictions: logged-in users may send anywhere; everybody else may only deliver to your own domains. This line is what keeps the server from becoming an open relay.

The second block adds the submission service on port 587 to master.cf: TLS required (encrypt), login required, everyone else refused. To stop a logged-in user from sending under somebody else's address, Postfix's SASL guide adds smtpd_sender_login_maps with reject_sender_login_mismatch; worth doing once you have more than one user.

Then test for an open relay from another machine, not from the VPS, since mail from the server itself is trusted. Connect to port 25, give a sender and a recipient that are both outside your domains, and expect the RCPT TO line to be refused with code 554, the default answer of Postfix's reject_unauth_destination rule. The -quiet option keeps openssl from treating a line that starts with R as a command.

Install Postfix and set main.cf
apt install postfix
postconf -e "myhostname = mail.example.com"
postconf -e 'myorigin = $mydomain'
postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain'
postconf -e "inet_interfaces = all"
postconf -e "inet_protocols = ipv4"
postconf -e "home_mailbox = Maildir/"
postconf -e "smtpd_tls_chain_files = /etc/letsencrypt/live/mail.example.com/privkey.pem, /etc/letsencrypt/live/mail.example.com/fullchain.pem"
postconf -e "smtpd_tls_cert_file =" "smtpd_tls_key_file ="
postconf -e "smtpd_tls_security_level = may"
postconf -e "smtp_tls_security_level = may"
postconf -e "smtpd_tls_auth_only = yes"
postconf -e "smtpd_sasl_type = dovecot"
postconf -e "smtpd_sasl_path = private/auth"
postconf -e "smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination"
Port 587: the submission service in master.cf, then a full restart
postconf -M submission/inet="submission inet n - y - - smtpd"
postconf -P "submission/inet/syslog_name=postfix/submission"
postconf -P "submission/inet/smtpd_tls_security_level=encrypt"
postconf -P "submission/inet/smtpd_sasl_auth_enable=yes"
postconf -P "submission/inet/smtpd_client_restrictions=permit_sasl_authenticated,reject"
postconf -P "submission/inet/smtpd_relay_restrictions=permit_sasl_authenticated,reject"
postconf -Mf submission/inet
systemctl stop postfix
systemctl start postfix
postconf -n
Open relay test, typed from another machine (expect 554 after RCPT TO)
openssl s_client -starttls smtp -connect mail.example.com:25 -crlf -quiet
EHLO test.example.net
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
QUIT

Step 4: configure Dovecot (IMAP, Maildir, login for Postfix)

Install the IMAP server, then write your settings into /etc/dovecot/local.conf. On Debian and Ubuntu the packaged dovecot.conf reads the files in conf.d/ first and local.conf last, so your values override the defaults without touching the packaged files.

Pick the block for your version from the table above. Both do the same five things: store mail in ~/Maildir (the folder Postfix writes to), require TLS, use the Let's Encrypt files, offer the PLAIN and LOGIN mechanisms (Dovecot's howto notes that Outlook and Windows Mail work only with LOGIN), and create the socket /var/spool/postfix/private/auth that Postfix uses to check passwords, owned by the postfix user with mode 0660.

Two lines need a word on 2.4. Debian 13's 10-mail.conf keeps the inbox in /var/mail/, mbox style; mail_inbox_path = . moves it to the root of ~/Maildir, because Dovecot's settings reference makes that path relative to mail_path. And since Debian 13's dovecot.conf already opens with dovecot_config_version = 2.4.0, your local.conf must not repeat it. The protocols block turns IMAP on explicitly, as the 2.4 quick configuration does.

Run doveconf -n before you restart. It prints the settings that differ from the defaults and reports any line it cannot parse; a 2.3 name left in a 2.4 file is the usual culprit. Then restart Dovecot, run the certificate hook from Step 2 once, and check that the socket exists.

Install Dovecot (all systems)
apt install -y dovecot-core dovecot-imapd
Dovecot 2.3 (Debian 12, Ubuntu 24.04, Ubuntu 22.04): /etc/dovecot/local.conf
mail_location = maildir:~/Maildir
ssl = required
ssl_cert = </etc/letsencrypt/live/mail.example.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/mail.example.com/privkey.pem
auth_mechanisms = plain login

service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0660
    user = postfix
    group = postfix
  }
}
Dovecot 2.4 (Debian 13): /etc/dovecot/local.conf
protocols {
  imap = yes
}
mail_driver = maildir
mail_path = ~/Maildir
mail_inbox_path = .
ssl = required
ssl_server_cert_file = /etc/letsencrypt/live/mail.example.com/fullchain.pem
ssl_server_key_file = /etc/letsencrypt/live/mail.example.com/privkey.pem
auth_mechanisms = plain login

service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0660
    user = postfix
    group = postfix
  }
}
Check the configuration, restart, test the reload hook
doveconf -n
systemctl restart dovecot
/etc/letsencrypt/renewal-hooks/deploy/reload-mail.sh
ls -l /var/spool/postfix/private/auth

Step 5: create mailboxes and connect a mail client

With system users, each mailbox is a Linux account: the login name is the IMAP user name, and the Linux password is the mail password. adduser asks for it; use a long, unique one, since anyone on the internet can try it against ports 587 and 993. The user alice logs in as alice and sends as [email protected].

Point root and dmarc at a real user in /etc/aliases, so that system mail and the DMARC reports of Step 6 reach someone, then rebuild the alias table with newaliases, as Postfix's aliases manual says to do after each change.

For more than a handful of mailboxes, or addresses on several domains, move to virtual users later: a passwd-file or a database in Dovecot, and virtual mailbox domains in Postfix. Dovecot's quick configuration shows the passwd-file route.

Create a mailbox and the aliases
adduser alice
echo "root: alice" >> /etc/aliases
echo "dmarc: alice" >> /etc/aliases
newaliases
Mail client settings for the server built in this guide (18 November 2026).
SettingIncoming mail (IMAP)Outgoing mail (SMTP)
Servermail.example.commail.example.com
Port993587
SecuritySSL/TLSSTARTTLS
User name and passwordalice, her Linux passwordThe same

Step 6: SPF, DKIM and DMARC records

These three records tell receivers that mail from example.com really comes from your server. SPF lists the hosts allowed to send: v=spf1 mx -all means the hosts in your MX record and nobody else, and under RFC 7208 the -all turns every other sender into a fail. DKIM signs each outgoing message with a key whose public half sits in DNS. DMARC tells receivers what to do when the checks fail and where to send reports; RFC 9989, published in May 2026, is its standard now and keeps the v=DMARC1 records you already know.

DKIM with OpenDKIM. Debian and Ubuntu keep keys in /etc/dkimkeys, a directory the package creates with the right permissions; the key file must belong to the opendkim user with mode 0600. opendkim-genkey writes mail.private (the private key) and mail.txt (the DNS record) for the selector mail; Debian's default size is already 2048 bits, and -b 2048 makes it explicit. Publish the content of mail.txt as a TXT record named mail._domainkey.example.com, joining its quoted strings if your DNS host wants one value.

Debian's /etc/opendkim.conf listens on a Unix socket under /run/opendkim/, which a chrooted Postfix cannot reach, as the file's own comments point out. Replace that Socket line with the TCP socket on port 8891 (also listed in the comments), add the domain, selector and key, then route Postfix mail through the milter. With milter_default_action = accept, mail leaves unsigned if OpenDKIM is down; Postfix 3.11 changed the default to shutdown and earlier versions use tempfail, the choice if you would rather queue mail than send it unsigned. opendkim-testkey then checks the published key against the private one.

DMARC. Start with p=none and an rua address that exists (the dmarc alias from Step 5). Read the aggregate reports for a week or two. When they show only your own server passing, move to p=quarantine, and later to p=reject.

OpenDKIM: install and generate the key (shell)
apt install -y opendkim opendkim-tools
opendkim-genkey -b 2048 -d example.com -D /etc/dkimkeys -s mail
chown opendkim:opendkim /etc/dkimkeys/mail.private
chmod 600 /etc/dkimkeys/mail.private
cat /etc/dkimkeys/mail.txt
/etc/opendkim.conf: set these lines (replace the existing Socket line)
Domain    example.com
Selector  mail
KeyFile   /etc/dkimkeys/mail.private
Socket    inet:8891@localhost
Postfix: send mail through OpenDKIM, then test the published key
postconf -e "milter_default_action = accept"
postconf -e "smtpd_milters = inet:localhost:8891"
postconf -e 'non_smtpd_milters = $smtpd_milters'
systemctl restart opendkim postfix
opendkim-testkey -d example.com -s mail -vvv
Final DNS for example.com and the rule each record meets in Google's sender guidelines (in force since 1 February 2024, page read 18 November 2026), RFC 7208 (SPF) and RFC 9989 (DMARC).
RecordNameExample valueWhat it answers
Amail.example.com203.0.113.10Valid forward DNS for the sending host
PTR10.113.0.203.in-addr.arpamail.example.com.Valid reverse DNS for the sending IP, required for every sender to Gmail
TXT (SPF)example.comv=spf1 mx -allSPF or DKIM is required for every sender; at most 10 DNS-lookup terms
TXT (DKIM)mail._domainkey.example.comv=DKIM1; h=sha256; k=rsa; p=… (from mail.txt)Key of 1,024 bits or more for Gmail; 2,048 recommended
TXT (DMARC)_dmarc.example.comv=DMARC1; p=none; rua=mailto:[email protected]Required above 5,000 messages a day; p=none is accepted

Step 7: test before you trust it

How do you test a mail server? Run these checks in order; each one catches a different fault.

  1. DNS. From any machine, the dig commands below must return your MX host, the SPF, DKIM and DMARC records and, for -x, your mail hostname. An empty answer to -x means the PTR from Step 1 is not in place yet.
  2. TLS on every port. From another machine, openssl s_client must show your Let's Encrypt certificate on 25 and 587 (with STARTTLS) and on 993.
  3. No open relay. The test from Step 3 must end with a 554 refusal.
  4. Local delivery. Set up your client (Step 5), send a message to your own address on port 587 and read it over IMAP.
  5. Outbound to a large provider. Send one message to an address you control at a large mailbox provider. Open the full headers and find Authentication-Results: you want spf=pass, dkim=pass and dmarc=pass.
  6. Blocklists. Look the IP address up on a blocklist checker. A listed address explains rejections that no setting will fix.
  7. Logs. Every delivery attempt and the remote server's reply are in the journal. A reply starting with 5 that names reverse DNS or a blocklist tells you what to fix.

Then start slowly. Send real mail to a few people for some days before you move your main address: a new address that suddenly sends hundreds of messages looks like a spam source.

DNS checks (any machine)
dig +short MX example.com
dig +short TXT example.com
dig +short TXT mail._domainkey.example.com
dig +short TXT _dmarc.example.com
dig +short -x 203.0.113.10
TLS checks (another machine)
openssl s_client -starttls smtp -connect mail.example.com:25 -servername mail.example.com
openssl s_client -starttls smtp -connect mail.example.com:587 -servername mail.example.com
openssl s_client -connect mail.example.com:993 -servername mail.example.com
Logs on the VPS
journalctl -u 'postfix*' --since today
journalctl -u dovecot --since today
journalctl -u opendkim --since today

Keep the mail server running: updates, certificates, queue and logs

A mail server is never finished. Four routines keep it healthy:

  • Security updates. Install unattended-upgrades and answer yes when dpkg-reconfigure asks; Debian's wiki says its default configuration installs security updates, not new features.
  • Certificates. The timer and the deploy hook from Step 2 handle them. Check certbot certificates now and then for the expiry date.
  • The queue. postqueue -p lists mail waiting for delivery, postqueue -f retries it, and postsuper -d deletes one message by its queue ID. A queue that keeps growing means remote servers are deferring you: the log says why.
  • Logs and reputation. Read the journal weekly, and look your IP address up on a blocklist checker every month.

Next steps sit outside this guide. fail2ban can block addresses that keep failing logins on Postfix and Dovecot, and a spam filter such as Rspamd sorts incoming junk. Keep SSH on keys only, or reachable only through a WireGuard VPN you run yourself.

Open port 25 comes with one rule on Nymhost: spam and bulk email are forbidden, and a VPS used for either is suspended. Mail for yourself, your family or your team is what this setup is for.

Updates, queue and certificate checks
apt install -y unattended-upgrades
dpkg-reconfigure unattended-upgrades
postqueue -p
postqueue -f
postsuper -d QUEUE_ID
certbot certificates

Back up your mailboxes (no Nymhost plan includes backups)

No Nymhost plan includes backups. A reinstall erases the disk, and a VPS whose renewal is not paid stops when its time runs out, with its disk kept for 7 days before it is wiped. Your mail exists only where you copy it.

What to save:

  • each user's ~/Maildir;
  • /etc/postfix, /etc/dovecot and /etc/aliases;
  • /etc/opendkim.conf and /etc/dkimkeys (lose the key and you must publish a new DKIM record);
  • /etc/letsencrypt, or simply request a new certificate after a rebuild.

Where: on another machine, such as a second server or your own computer. Never only on the same VPS.

How. A plain rsync of a live Maildir can copy a message twice or miss one that moves during the copy. doveadm backup makes a one-way copy through Dovecot instead: its manual says the destination ends up exactly like the source. The destination is written like a mail location (maildir: and a path, ~ being the user's home). Run it for each user, archive the configuration, then pull both to your backup machine with rsync over SSH. --delete removes from the copy what is gone from the server, so keep several generations (one folder per weekday, for instance) in case a mistake is copied over your only backup.

Schedule the server-side commands with cron or a systemd timer, at night. Test a restore at least once: copy a backup into a new test user's ~/Maildir, give the files to that user, and open the mailbox in a mail client. A backup you have never restored is a guess.

On the VPS, every night (as root, one doveadm line per user)
doveadm backup -u alice maildir:~/Maildir-backup
tar -czf /root/mail-config.tar.gz /etc/postfix /etc/dovecot /etc/aliases /etc/opendkim.conf /etc/dkimkeys /etc/letsencrypt

# crontab -e, then for example:
# 30 3 * * * doveadm backup -u alice maildir:~/Maildir-backup
On your backup machine, not on the VPS
rsync -a --delete -e ssh [email protected]:/home/alice/Maildir-backup/ ./alice-Maildir/
rsync -a -e ssh [email protected]:/root/mail-config.tar.gz ./
Restore test into a new user
# on the VPS
adduser restoretest

# on the backup machine
rsync -a -e ssh ./alice-Maildir/ [email protected]:/home/restoretest/Maildir/

# on the VPS again
chown -R restoretest:restoretest /home/restoretest/Maildir

Mail server problems: what to check first

Most faults show up in the journal within seconds of a test. Start from the symptom, check the likely cause, and change one thing at a time. If the IP address itself is the problem, no setting fixes it: check IP reputation before you buy a plan or move your mail.

Common faults on a Postfix and Dovecot server built with this guide, with the command that confirms each (18 November 2026).
SymptomLikely causeCheck with
Port 25 times out from outsideFirewall rule missing, or Postfix listening on localhost onlyufw status verbose, postconf inet_interfaces
Remote server refuses mail and mentions reverse DNSNo PTR for the IP, or one that does not match mail.example.comdig +short -x 203.0.113.10, then ask support
Mail client warns of an expired certificateRenewal failed, or the services were not reloadedcertbot certificates, then run the deploy hook
Dovecot will not start after a move to Debian 132.3 setting names in a 2.4 configurationdoveconf -n, journalctl -u dovecot
Login fails in the mail clientWrong port or security type, or a cleartext login refused993 with SSL/TLS, 587 with STARTTLS; journalctl -u dovecot
Messages land in spamDKIM missing or failing, IP on a blocklist, or a new address with no historyAuthentication-Results header, opendkim-testkey, a blocklist lookup
Mail waits in the queueRemote servers defer you (rate limits or reputation)postqueue -p and the log line for that message

Email server on VPS: setup questions

Can I run a mail server on a VPS without a static IP?

Not in practice. Your MX record, your SPF record and the PTR all point at one address, and receivers judge your mail by its history. Every Nymhost VPS comes with one dedicated IPv4 address, which is what a mail server needs.

Is port 25 open on Nymhost?

Yes. Outbound port 25 is open on every Nymhost VPS, so Postfix can deliver straight to other servers without a relay. Sending spam or bulk email is forbidden and gets the VPS suspended.

Postfix with Dovecot 2.3 or 2.4?

It depends on the system. Debian 13 installs Dovecot 2.4.1; Debian 12 (2.3.19.1), Ubuntu 24.04 (2.3.21) and Ubuntu 22.04 (2.3.16) install 2.3. Postfix works the same with both. Use the matching Dovecot file from Step 4, because 2.4 refuses several 2.3 setting names.

How much does a VPS mail server cost per month?

The server itself is the main cost. Offshore 2 (2 GB RAM) costs $4.89 for one month, or $3.42 a month when paid for 12 months; Global 2, also 2 GB, costs $3.19. Compare the options on the VPS for email server page. The domain is a separate cost at your registrar.

Do I need Roundcube?

No. Desktop and phone mail clients connect over IMAP on port 993 and SMTP on port 587, and that is all this setup needs. Roundcube adds a web server, PHP and a database to the VPS; add it only if you want to read mail in a browser. The Roundcube webmail guide continues from this setup.

How do I back up a VPS mail server?

Copy each Maildir with doveadm backup, archive /etc/postfix, /etc/dovecot, the DKIM key and the certificates, then pull everything to another machine with rsync over SSH every night. Keep several generations and test a restore. No Nymhost plan includes backups.

Can I run a mail server without KYC?

Yes. A mail server without KYC is possible on Nymhost: the VPS needs no ID, no phone number and no card, and you pay in crypto. Your domain registrar and DNS host have their own rules, and public records such as MX and SPF are visible to everyone.

Plans that fit this Postfix and Dovecot setup

Offshore 2 or Global 2 (2 GB) for a few mailboxes; Offshore 4 or Global 4 (4 GB) once you add a spam filter. Compare memory needs on which VPS for a mail server, or see every Nymhost VPS plan and the anonymous Linux VPS offer.

Nymhost Offshore

Amsterdam · Reykjavik · Zurich · Bucharest

Offshore 1

$3.09/ month

3 mo $8.346 mo $14.8312 mo $25.95

  • 1 vCPU
  • 1 GB RAM
  • 20 GB NVMe
  • 2 TB traffic
Deploy Offshore 1

Offshore 2

$4.89/ month

3 mo $13.206 mo $23.4712 mo $41.07

  • 1 vCPU
  • 2 GB RAM
  • 40 GB NVMe
  • 4 TB traffic
Deploy Offshore 2

Offshore 4

Best balance

$8.19/ month

3 mo $22.116 mo $39.3112 mo $68.79

  • 2 vCPU
  • 4 GB RAM
  • 80 GB NVMe
  • 8 TB traffic
Deploy Offshore 4

Offshore 8

$13.49/ month

3 mo $36.426 mo $64.7512 mo $113.31

  • 4 vCPU
  • 8 GB RAM
  • 160 GB NVMe
  • 12 TB traffic
Deploy Offshore 8

Offshore 16

$20.49/ month

3 mo $55.326 mo $98.3512 mo $172.11

  • 8 vCPU
  • 16 GB RAM
  • 320 GB NVMe
  • 20 TB traffic
Deploy Offshore 16

Nymhost Global

New York · Dallas · Los Angeles · London · Amsterdam · Frankfurt

Global 2

$3.19/ month

3 mo $8.616 mo $15.3112 mo $26.79

  • 1 vCPU
  • 2 GB RAM
  • 40 GB NVMe
  • 2 TB traffic
Deploy Global 2

Global 4

$6.39/ month

3 mo $17.256 mo $30.6712 mo $53.67

  • 2 vCPU
  • 4 GB RAM
  • 65 GB NVMe
  • 2 TB traffic
Deploy Global 4

Global 6

$9.59/ month

3 mo $25.896 mo $46.0312 mo $80.55

  • 2 vCPU
  • 6 GB RAM
  • 120 GB NVMe
  • 6 TB traffic
Deploy Global 6

Global 8

$19.19/ month

3 mo $51.816 mo $92.1112 mo $161.19

  • 4 vCPU
  • 8 GB RAM
  • 160 GB NVMe
  • 12 TB traffic
Deploy Global 8

Global 24

$29.39/ month

3 mo $79.356 mo $141.0712 mo $246.87

  • 8 vCPU
  • 24 GB RAM
  • 400 GB NVMe
  • 12 TB traffic
Deploy Global 24

Prices in US dollars, checked on 18 November 2026. Paid from a crypto balance (minimum top-up $25); 3, 6 and 12 months save 10, 20 and 30%. Every plan: KVM, root over SSH, 1 dedicated IPv4 + /64 IPv6, shared 1 Gbit/s port.

Choose the VPS for your mail server

Outbound port 25 is open on every plan, paid in crypto without KYC, built by a person usually within minutes.

Sources

  1. Debian package search: dovecot-core (bookworm 2.3.19.1, trixie 2.4.1) Debian
  2. Debian package search: postfix (bookworm 3.7.11, trixie 3.10.13) Debian
  3. Debian package search: opendkim Debian
  4. Ubuntu package search: dovecot-core (jammy 2.3.16, noble 2.3.21) Canonical
  5. Ubuntu package search: postfix (jammy 3.6.4, noble 3.8.6) Canonical
  6. Ubuntu package search: opendkim Canonical
  7. Upgrading Dovecot CE from 2.3 to 2.4 (2.4.1 documentation) Dovecot
  8. Dovecot 2.4.1 quick configuration Dovecot
  9. Dovecot 2.4.1 Maildir mailbox format Dovecot
  10. Dovecot 2.4.1 settings reference (mail_inbox_path, auth_allow_cleartext) Dovecot
  11. Dovecot 2.4.1: Postfix SASL howto Dovecot
  12. Dovecot 2.3: Postfix and Dovecot SASL Dovecot
  13. Dovecot 2.3: SSL configuration Dovecot
  14. Dovecot 2.3: Maildir mail location Dovecot
  15. doveadm-sync(1) and doveadm backup (2.4.1) Dovecot
  16. doveadm-sync(1), Dovecot 2.3.21 on Ubuntu 24.04 Canonical
  17. Debian 13 Dovecot packaging: dovecot.conf and conf.d (10-mail, 10-ssl, 10-auth, 10-master) Debian
  18. Postfix SASL Howto Postfix
  19. Postfix TLS Support Postfix
  20. Postfix configuration parameters, postconf(5) Postfix
  21. postconf(1) on Debian 13 (-e, -n, -M, -P) Debian
  22. Postfix Basic Configuration Postfix
  23. Postfix before-queue Milter support Postfix
  24. postqueue(1), postsuper(1) and aliases(5) Postfix
  25. Certbot user guide Electronic Frontier Foundation
  26. opendkim.conf(5), opendkim-genkey(8) and opendkim-testkey(8) on Debian 13 Debian
  27. Debian OpenDKIM packaging: opendkim.conf and README.PrivateKeys Debian
  28. Email sender guidelines Google
  29. RFC 7208: Sender Policy Framework (SPF) IETF
  30. RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance (DMARC) IETF
  31. ufw(8) on Debian 13 Debian
  32. hostnamectl(1) and journalctl(1) on Debian 13 Debian
  33. dig(1) on Debian 13 Debian
  34. openssl-s_client(1) OpenSSL
  35. rsync(1) on Debian 13 Debian
  36. UnattendedUpgrades Debian Wiki
  37. Mail-in-a-Box setup guide (reverse DNS) Mail-in-a-Box
  38. Prepare your system (mailcow: dockerized documentation) mailcow