// Engineering Log

Email Setup: Part 3 — Self-Hosted Mail Server (using Mailcow as an example)

Published on 2026-09-21

The most labor-intensive way to organize corporate email is to deploy your own mail server. It gives full control over mail but requires serious technical expertise. One of the most convenient solutions for this task is Mailcow: a ready-made set of Docker containers that includes a mail server, anti-spam, antivirus, a web interface for working with mail, and an admin panel.

Full control over email

On your own server, mailbox sizes, number of users, filtering rules, protection and integrations are determined only by your requirements. This option is chosen by those who do not want to depend on third-party services, must meet specific security or data retention requirements, or want to fully manage their mail infrastructure.

Advantages

  • Control over data. All correspondence is stored on your server, and you control every parameter of its operation.
  • Flexibility. You can configure rules and integrations that mail providers don’t offer.
  • Security. With proper configuration, the level of protection is determined by you, not by a third-party company’s policy.
  • Cost savings at scale. When there are many mailboxes or they are very large, a self-hosted server can be cheaper in the long run than a subscription.

Drawbacks

  • High entry barrier. Deep knowledge of Linux, networking, DNS, mail protocols, and information security is required.
  • Ongoing maintenance. You need to monitor updates, backups, spam filters, and IP reputation. This is not a system you can install and forget.
  • Responsibility for failures. There is no support service: you will have to troubleshoot problems yourself.
  • Server requirements. You need a VPS or a dedicated server. According to Mailcow’s official documentation, it requires at least 6 GB of RAM and 1 GB of swap, as well as 20 GB of disk space excluding the mail storage.
  • Deliverability. To prevent messages from being marked as spam by other providers, you must correctly configure SPF, DKIM and DMARC, set a reverse DNS record (PTR) for the server’s IP address, and maintain a good IP reputation. Additionally, many hosting providers block outgoing connections on port 25 by default, and without their permission the server will not be able to send mail.

Cost

Mailcow, like other open-source solutions, is free. Expenses are related to other items:

  • domain — required;
  • VPS or dedicated server — the main expense, cost depends on required resources;
  • time and expertise — the most significant investment for setup and maintenance.

Required skills and difficulty

  • Skills:
    • strong Linux administration skills, especially Debian and Ubuntu;
    • experience with Docker and Docker Compose;
    • deep understanding of DNS, primarily A, MX, PTR, SPF, DKIM and DMARC records;
    • basics of network security and firewall configuration;
    • ability to read logs and diagnose issues.
  • Difficulty — very high. This is a choice for experienced system administrators or those willing to spend a lot of time learning and maintaining a server.

A self-hosted mail server with Mailcow is suitable for those who need full control over their email and are willing to invest knowledge and time into its maintenance.

// Reviews

Related reviews

// Contact

Need help?

Get in touch with me and I'll help solve the problem

I reply within one business day (03:00-13:00 GMT)

Или оставьте заявку здесь:

Confirm that you are not a bot.

Write and get a quick reply