Introduction

For a while now, my hosting company JR-Hosting, was stopped. But I still needed a way to host my mailboxes and that of several other domains that I own. It was brought to my attention that while playing with Docker I could combine that with a mailserver setup. Mailcow, or better Mailcow Dockerized. As there was a previous version which did not use Docker :-).

The setup is trivial Installation link or at least it was for me. I used one of the components before, at home, for JRHosting and at work where I created the foundation for the currently still in use rspamd setup at work.

Mailcow

Mailcow consists of several helper programs, like rspamd for antispam filtering, dovecot for hosting the mailboxes (storage and delivery/filtering), postfix for the actual mailserver, nginx and php-fpm for the webpages that are hosted on the platform.

Rspamd

As mentioned one of the applications is rspamd, this is a fast and modulair anti spam system that uses several modules and feedback from those modules to define a score to a message. It’s not soley bayes or rbls that form the strength of rspamd. It is written by Vsevolod Stakhov, a hardliner when encountering things that are just not right (outspoken), but a very pragmatic programmer. You need to convince him when there is an error, you will not always get an easy time, but given my years of seeing him in action, he always evaluates your feedback and if found proven he will fix the issues.

Grafana

One of the things that are lacking in all applications, is a dashboard for the environment. And truth to be told, you can create a dashboard for the individual applications, some of them even support prometheus exporter output. But there is no general way to see the individual state. And this is likely not to come, everyone’s needs are different. What works for me is an specific overview, and what works for you is another specific overview. Those might not align or even look a like.

Designing my own

So, there is this thing called ‘mailcow-exporter’, I use this one from Docker: thej6s/mailcow-exporter which reads your mailcow parameters via the API and exposes them as prometheus understandable format.

I then started experimenting with Grafana, I know the tool enough for my needs but I like to play around every now and then to make it even better. I am not graphically oriented though so there are things that might be better.

It worked out for the following dashboard, note that I set the timer on “5” minutes for some of the graphs because I used updated my mailcow installation and some containers where counted twice :-) :

Mailcow Dashboard

Want more?

If you are interested in the above dashboard, poke me and we’ll see how we can arrange for you to have the dashboard. If you have suggestions, please let me know as well!

You can also find the direct json file here: https://github.com/remkolodder/mailcow-dashboard