Today's Deep-Dive: Mailcow
Ep. 368

Today's Deep-Dive: Mailcow

Episode description

Running your own email server has long been considered one of the most complex - and frustrating - tasks in IT. In this episode, we explore Mailcow: Dockerized, an open-source mail server suite that simplifies this challenge by packaging all essential components into a single, containerized system.

Mailcow combines critical email infrastructure - Postfix (sending), Dovecot (receiving), Rspamd (spam filtering), ClamAV (antivirus), and SOGo (webmail and groupware) - into isolated Docker containers. This approach eliminates dependency conflicts, simplifies updates, and makes deployment far more accessible, even for those new to self-hosting.

We break down how Docker enables this “all-in-one” architecture, allowing each service to run independently while working seamlessly together. Additional tools like Docker Compose orchestrate the system, while ACME integration automates SSL certificate management - ensuring secure communication without manual intervention.

The episode also highlights Mailcow’s active development and strong security focus. From rapid vulnerability patches to modern standards like MTA-STS for enforced encryption, the project demonstrates a commitment to keeping self-hosted email both secure and up to date.

Finally, we explore the broader lesson: modern infrastructure doesn’t have to be overwhelming. With the right containerized approach, even complex systems like email can become manageable, reliable, and accessible.

If you’ve ever considered self-hosting email but were intimidated by the complexity, this deep dive shows how Mailcow transforms a notorious challenge into a practical, maintainable solution.

Gain digital sovereignty now and save costs

Let’s have a look at your digital challenges together. What tools are you currently using? Are your processes optimal? How is the state of backups and security updates?

Digital Souvereignty is easily achived with Open Source software (which usually cost way less, too). Our division Safeserver offers hosting, operation and maintenance for countless Free and Open Source tools.

Try it now!

Download transcript (.srt)
0:00

Welcome back to The Deep Dive. Today we are wrestling with a legendary beast of

0:05

internet infrastructure, email.

0:08

Oh, yeah.

0:08

More specifically, we've taken a stack of sources that tackle one of the most notoriously

0:13

complex tasks in the tech world,

0:15

self-hosting your own email, and we found a surprising solution that makes it

0:19

accessible.

0:20

You know, for anyone who has ever even tried to run a professional-grade mail

0:24

server by hand, you know, it's not just one program.

0:27

Yeah.

0:28

It's a whole integrated system of, I don't know, half a dozen or more separate

0:32

applications.

0:33

Right.

0:33

I mean, you're talking about manually stitching together software for sending,

0:37

receiving, spam, filtering, virus checking, web access.

0:40

It just becomes this monster.

0:42

It truly becomes a Frankenstein's monster of dependency conflicts and just endless

0:47

configuration files.

0:48

It's a nightmare.

0:49

It sounds like a total nightmare.

0:50

And that's why our mission today is to deep dive into Mailcow, Dockerized.

0:55

This tool promises to tame that complexity.

0:58

We're going to explain what this open source suite is, why it uses the specific

1:01

technology it does, and what crucial components it brings together.

1:05

And we're going to make it accessible to you, even if you're an absolute beginner.

1:08

Exactly.

1:10

The core concept is, I have to say, wonderfully elegant, especially for a piece of

1:15

heavy infrastructure.

1:16

It's all represented by this charming little equation.

1:19

The cow plus the whale.

1:20

The cow plus a whale equals love.

1:23

The cow is male cow, obviously, the software suite itself, and the whale, that's

1:27

the logo for Docker.

1:28

The containerization technology that acts as the delivery vehicle.

1:32

It's a very, I mean, a very succinct way of saying, we've taken the most difficult

1:36

server task out there,

1:38

male management, and packaged it using the simplest, most reproducible technology

1:42

available today.

1:43

It just takes the pain away.

1:44

It absolutely does.

1:46

And before we start decoding that cow and that whale, we should probably thank our

1:49

supporter for making this deep dive possible.

1:52

We should.

1:54

This deep dive is brought to you by Safe Server.

1:56

Safe Server handles the hosting of powerful open source software, just like Mail

2:01

Cow, and supports your digital transformation journey.

2:04

They make sure your infrastructure keeps pace with your ambition.

2:07

You can find more information and support at www.safeserver.de.

2:13

OK, let's unpack this.

2:15

We've established a cute equation, but for someone coming in cold, what exactly is

2:20

Mail Cow Dockerized?

2:22

What problem does it solve right out of the box?

2:25

Simply put, it's an all-in-one mail server suite.

2:28

It's open source, released under the GNU general public license version three.

2:34

So you get all that transparency and community oversight.

2:36

And the Dockerized part?

2:38

The Dockerized part is the fundamental innovation.

2:40

It's what solves that Frankenstein's monster problem we were just talking about.

2:44

Let's focus on that for a second, because that's a magic trick we really need to

2:46

explain

2:47

for our audience.

2:48

What does using Docker actually mean for the administrator?

2:50

OK, think of it this way.

2:51

Traditionally, if you install, say, Postfix, you need a specific version of a

2:56

library.

2:56

Then if you install rspammed, it might need a conflicting version of that same

3:01

library.

3:01

And then everything breaks.

3:02

Everything breaks.

3:03

But Docker solves this by bundling each application, Postfix, rspammed, dubcot,

3:09

into its own separate

3:10

isolated environment, a container.

3:13

So if Postfix needs version 1.0 of a library and dubcot needs version 2.0, they can

3:19

just

3:20

peacefully coexist because they're sealed off from each other.

3:23

Precisely.

3:24

They're self-contained ecosystems.

3:25

And this means the components are portable.

3:28

They don't fight over dependencies on your operating system.

3:31

And this is crucial.

3:32

They are incredibly easy to update.

3:34

So instead of manually updating six different programs and just praying nothing

3:38

breaks.

3:39

Right.

3:40

They can essentially just pull a new pre-tested version of the entire MailCow

3:44

engine.

3:44

It's no wonder this project has such strong community adoption.

3:47

I mean, the GitHub source shows 11.9 thousand stars and 1.6 thousand forks.

3:53

That's a lot of interest.

3:54

That level of professional interest really confirms that they solved a fundamental

3:58

pain

3:58

point.

3:59

It does.

4:00

And you know, this isn't just a weekend hobby project.

4:03

It originated from the work of Andre, or at Andre Ashi, and it's actively managed

4:07

and

4:07

maintained by the infrastructure company GMBH.

4:10

So you get that blend of robust professional maintenance with that open source ethos.

4:15

That's it.

4:16

Okay, so now that we know what MailCow is and how it's packaged using containers,

4:20

let's

4:20

look inside the engine.

4:21

Since it's an all-in-one suite, it must replace every piece of that old, complex

4:26

mail server

4:27

puzzle.

4:28

What are those essential components?

4:30

This is where the scope of the project really comes into focus.

4:33

MailCow incorporates a pretty comprehensive stack, and we can break it down by

4:37

function.

4:38

Okay.

4:39

Let's start with the absolute basics of email transport.

4:42

The actual act of sending and receiving.

4:44

Right.

4:45

For sending mail, MailCow uses Postfix.

4:48

Think of Postfix as the post office truck, you know.

4:51

It implements the SMTP protocol and gets your email from point A to point B.

4:54

And for receiving.

4:56

For receiving and storing mail, it uses DoveCot.

4:58

DoveCot is like the sophisticated filing cabinet.

5:01

It handles IMAP and POP3, allowing your client, like your phone or desktop app, to

5:06

access

5:06

and store all those messages.

5:08

Okay, so we've got the delivery truck and the filing cabinet.

5:11

But I mean, modern email is utterly unusable without defense.

5:15

What about spam and malware?

5:18

That's probably the most complex layer.

5:20

And MailCow uses layered security here.

5:23

For advanced spam and filtering, it integrates spam.

5:26

That's a modern tool, right?

5:27

Yeah.

5:28

It's a modern spam filter that uses sophisticated rules, neural networks, all that

5:31

good stuff.

5:32

And for mandatory antivirus protection, it includes Clamov.

5:35

Our sources also mention Olify, which is often used to detect malicious macros in

5:40

documents.

5:40

So you can see their layering protection to catch different kinds of threats.

5:44

So we have the mail flow, we have the defense system, but I still need a user

5:47

interface,

5:47

right?

5:48

I need to check my mail from a browser, manage my calendar.

5:51

Exactly.

5:52

For web access and all those critical groupware features, calendars, contacts,

5:55

tasks, it includes

5:56

SoGo.

5:57

It gives you a polished web interface instantly.

5:59

And then there are the utilities, the unsung heroes.

6:02

The unsung heroes, precisely.

6:04

You need Docker Compose to orchestrate all those containers, making sure they start,

6:09

stop, and communicate correctly.

6:10

And the last one is probably the most important for security.

6:13

Oh yeah.

6:14

ACME.

6:15

ACME automates the management of your SSLTLS certificates.

6:20

If your certificates expire, your mail stops working securely, and that is a

6:24

massive headache.

6:25

MailCal just automates this entirely.

6:27

And that is the ultimate value proposition for you, the listener.

6:31

You are spared the headache of installing, configuring, and connecting seven

6:35

distinct

6:36

complex programs.

6:37

And hoping they all speak to each other perfectly and securely.

6:40

Yes.

6:41

MailCal just delivers a fully integrated, pre-calibrated engine.

6:44

It's the difference between buying a high-performance engine ready to drop into

6:46

your car versus

6:48

buying every single nut, bolt, piston, and carburetor separately and just hoping

6:52

they

6:52

fit together.

6:53

A much better proposition.

6:54

Now, let's talk about the project's pulse.

6:57

This isn't static software.

6:58

The source assurance is highly active with these fun-themed update names.

7:02

Yeah, like Moosember 2025, October 2025, and February 2025.

7:09

What does that steady stream of updates tell us about the quality of the product?

7:13

It tells us they're committed to both continuous improvement and, crucially, to

7:18

security.

7:19

The blog entries we review demonstrate a really immediate response culture.

7:24

For instance, the Muli update in July 2025 was a focused security patch.

7:28

So they prioritize vulnerabilities.

7:30

They prioritize them rapidly when they're discovered.

7:32

Can you walk us through a specific, recent security fix, something that shows their

7:37

attention

7:37

to detail?

7:38

Absolutely.

7:39

One critical fix they highlighted in the February 2025 update targeted potential

7:43

vulnerability

7:44

in how DoveCot was interacting with the firewall system, NetFilter.

7:47

Previously, if someone was trying to, say, brute force a password, DoveCot

7:52

sometimes

7:52

allowed multiple failed login attempts within a single session without being

7:56

properly detected.

7:57

So the firewall would miss it.

7:58

Exactly.

7:59

The attack could look like one single failed attempt when it was actually hundreds.

8:02

That loophole has now been closed, which is just foundational security work.

8:06

What about modernization?

8:07

I mean, email security standards are constantly shifting.

8:10

They're definitely keeping up.

8:11

A major step was detailed in the Mutember update 2025, the introduction of MTA STS

8:17

support.

8:18

Okay.

8:19

That sounds incredibly technical.

8:20

What's the simple translation?

8:21

It's a mechanism that forces secure delivery.

8:24

It basically tells other mail servers, do not talk to me unless you use a secure

8:29

encrypted

8:29

connection.

8:30

It prevents eavesdropping and guarantees encrypted delivery.

8:33

Which is pretty much a requirement now for professional email.

8:36

It's a standard requirement.

8:37

Yeah.

8:38

And they also mentioned ongoing work to roll out external authentication, like LDIP

8:42

and

8:42

OIDC, allowing Mailcow to integrate into larger company identity systems.

8:47

We also noticed significant infrastructural changes.

8:50

They're swapping out core parts inside the engine itself.

8:53

And that's the beauty of containerization.

8:55

They updated core dependencies like RSPAM, SOGO, MariaDB.

8:59

This constant refresh is vital for getting the latest security patches and

9:03

performance

9:03

boosts.

9:04

And the admin doesn't have to lift a finger for these massive component swaps.

9:08

Not a finger.

9:09

And it even extends to quality of life improvements.

9:12

I saw they fixed a tiny typo in an update script that was failing for some users.

9:17

That's an admin nightmare saved right there.

9:19

It is.

9:20

And a massive win for beginners.

9:23

They made enabling HTTPS redirect the default setting for new setups.

9:28

That's a great change.

9:29

That small default saves countless new administrators the headache of debugging why

9:33

their web interface

9:34

is only loading insecurely.

9:36

It shows they're anticipating user error.

9:39

Given this strong professional backing, what are the support options if you run

9:43

into a

9:43

tricky issue?

9:44

Well, there are three main layers.

9:45

First, there's comprehensive official documentation.

9:48

Second, a vibrant community, including active telegram channels.

9:52

They even have off-topic channels, which shows a healthy social side.

9:56

They do.

9:57

And third, for serious or professional users, they offer paid support options

10:01

through ServerCal,

10:02

like professional contracts or a one-time service assurance level.

10:05

So by supporting the company, you're directly investing in the development of the

10:08

open source

10:09

suite.

10:10

That's the idea.

10:11

OK, now we get to the real deep dive nuggets, the specific details that show the

10:15

level of

10:16

foresight this team has.

10:18

We noticed guidance for admins upgrading their operating system, Debian, that

10:23

addresses software

10:23

MailCow doesn't even use.

10:25

That's one of the most compelling pieces of information we found.

10:28

In their quick guide for upgrading Debian 12 to 13, they specifically warned

10:32

administrators

10:33

about a pitfall involving a competing mail server software called Exum.

10:37

Wait, MailCow uses Postfix.

10:40

Why are they warning about Exum?

10:42

Because the MailCow team knows that real-world server environments are messy.

10:46

An admin might have Exum installed for other legacy reasons, or it might have been

10:50

installed

10:51

by default.

10:52

So the MailCow team proactively warns their users about conflicts that aren't even

10:56

their

10:56

fault.

10:57

That is incredible.

10:58

They're looking at the admin's entire environment, anticipating problems external

11:02

to their own

11:02

product?

11:03

That, more than anything, demonstrates professional, comprehensive support.

11:07

That's the definition of going above and beyond.

11:09

And that attention to detail also extends to hardening their own code, right?

11:13

Right down to the cookies.

11:15

Exactly.

11:16

The changelogs show a focus on modern security best practices.

11:20

For instance, they updated the PHP session cookie to set the same site attribute to

11:24

lax.

11:24

A small but important change against certain attacks.

11:27

A very important one.

11:29

And they also standardized the name of that cookie to MCHesed and improved the

11:33

clarity

11:33

of the LDAP SSLTLS settings, making it much harder to accidentally misconfigure

11:39

secure

11:40

connections.

11:41

These small internal security fixes are what build trust in a platform that's

11:46

handling

11:46

mission-critical communication.

11:47

They are.

11:48

So if we zoom out, what have we learned about self-hosting email in the modern era?

11:52

I think we've learned that MailCal provides a simplified, actively maintained, and

11:57

fully

11:57

featured approach to running your own mail server.

12:00

By mastering the use of Docker, it successfully tames that inherent complexity of

12:03

components

12:04

like Postfix and Rspam.

12:06

It ultimately makes enterprise-grade mail management feasible for anyone with a

12:10

foundation

12:10

in server administration.

12:12

So what this all means for you, the learner, is that high-level open-source

12:16

infrastructure

12:17

doesn't have to be a nightmare to set up, provided you find the right containerized

12:21

solution.

12:22

It takes the heavy lifting off your plate.

12:24

But the journey of MailCal is one of constant focus and streamlining, and that

12:27

raises a

12:28

really fascinating final question for you to consider.

12:32

The January 2025 update notes a major decision.

12:36

Which changed the full-text search, and which kicked out Nextcloud?

12:40

That's powerful.

12:41

I mean, Nextcloud is a massive groupware suite in its own right.

12:45

Kicking it out suggests a really serious commitment to a narrow focus.

12:48

It does.

12:49

It points to this constant evaluation of the suite's core purpose, and it raises an

12:53

essential

12:53

question for any infrastructure project.

12:55

Which is?

12:56

Which features are truly essential for a focused, efficient mail server, and which

13:00

ones might

13:00

actually dilute its mission and introduce unnecessary complexity?

13:04

Where do you draw that line?

13:06

A question for you to mull over as you start your own deep dive into containerized

13:11

infrastructure.

13:12

We'd like to thank our supporter for this deep dive, SafeServer.

13:15

Find more information about hosting powerful software and support for your digital

13:19

transformation

13:20

at www.safeserver.de.

13:22

Join us next time for another deep dive into the source material that matters.

13:22

Join us next time for another deep dive into the source material that matters.