Setting up and configuring a mail server

A 4-part series covering mail, postfix, dovecot and ubuntu

By Dejan Panovski

Updated on

4 parts

Setting up and configuring a mail server

Setting up and configuring a mail server is a challenging process, mostly because there are so many different components involved and each one has to be configured to work with the others.

This series shows how to set up a complete virtual user mail system on an Ubuntu 26.04 server with PostfixAdmin, Postfix, Dovecot, Rspamd, Redis, and Roundcube.

What You Will Learn

  • Postfix - Mail transfer agent (MTA), software used to send and receive email.
  • Dovecot - Mail delivery agent for IMAP/POP3 access, mail delivery, authentication, and more.
  • PostfixAdmin - Web interface that lets you manage mailboxes, virtual domains, and aliases.
  • Nginx and PHP - To access the PostfixAdmin and Roundcube web interfaces.
  • MySQL - To store information about domains and virtual users.
  • Rspamd - Spam filter that scans messages and signs outbound email with DKIM keys.
  • Redis - A key-value store used by Rspamd modules.
  • Roundcube - A web-based IMAP email client for browser access to mailboxes.

Prerequisites

  • An Ubuntu 26.04 server with sudo access
  • A domain name with DNS control
  • A public IPv4 address with PTR/rDNS control
  • Open ports for SMTP, HTTP, HTTPS, authenticated submission, and IMAP over TLS

By the end of this series, you will have a working mail server with a web interface, virtual users and domains, spam filtering, and DKIM, SPF, and DMARC records for better email delivery.

Articles