Mailu is a batteries-included, Docker Compose-based mail server that bundles Postfix, Dovecot, Rspamd, a web admin panel, and webmail in a single stack. That convenience comes with a monitoring challenge: you have multiple containers and multiple protocols to watch. Vigilmon lets you monitor each Mailu component from the outside — catching container crashes, port failures, and TLS issues before they affect your users.
What You'll Set Up
- HTTP monitor for the Mailu admin web interface
- HTTP monitor for webmail (Snappymail / Roundcube)
- TCP port checks for SMTP, IMAP, POP3
- Mailu health endpoint monitoring
- SSL certificate alerts for your mail domain
- Alert channels for your team
Prerequisites
- Mailu running via Docker Compose
- Mail domain configured (e.g.
mail.yourdomain.com) - Admin UI accessible at
https://mail.yourdomain.com/admin - Webmail accessible at
https://mail.yourdomain.com/webmail - A free Vigilmon account
Step 1: Monitor the Mailu Admin Interface
The Mailu admin panel manages domains, users, and mail configuration. Monitoring it confirms the front-end nginx container and the Mailu Flask admin app are both running.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter the URL:
https://mail.yourdomain.com/admin. - Set Check interval to
2 minutes. - Set Expected HTTP status to
200. - Enable Monitor SSL certificate and set the expiry warning to
14 days. - Click Save.
A non-200 response typically means the admin container has crashed, or the front (nginx) container that routes traffic to it is down.
Step 2: Monitor Webmail
If your users access mail through Snappymail or Roundcube, monitor the webmail login page directly:
- Add Monitor →
HTTP / HTTPS. - URL:
https://mail.yourdomain.com/webmail. - Set Expected HTTP status to
200. - Set Check interval to
2 minutes. - Click Save.
The webmail container is separate from the admin container in Mailu's Docker Compose stack — a crash in one doesn't necessarily take down the other.
Step 3: Mailu Health Check Endpoint
Mailu's front nginx container serves a health check at /health:
- Add Monitor →
HTTP / HTTPS. - URL:
https://mail.yourdomain.com/health. - Set Expected HTTP status to
200. - Set Check interval to
1 minute. - Click Save.
This endpoint confirms the front container is alive and routing requests. If it returns anything other than 200, the entire Mailu stack's ingress point is broken.
Step 4: TCP Port Checks for Mail Protocols
Mailu exposes standard mail ports via its front container. Check each port with a TCP monitor:
SMTP (port 25) — inbound delivery:
- Add Monitor →
TCP Port. - Host:
mail.yourdomain.com, Port:25. - Set Check interval to
2 minutes. - Click Save.
Submission (port 587) — authenticated outbound:
- Add Monitor →
TCP Port. - Host:
mail.yourdomain.com, Port:587. - Click Save.
SMTPS (port 465) — secure submission:
- Add Monitor →
TCP Port. - Host:
mail.yourdomain.com, Port:465. - Click Save.
IMAP (port 143):
- Add Monitor →
TCP Port. - Host:
mail.yourdomain.com, Port:143. - Click Save.
IMAPS (port 993):
- Add Monitor →
TCP Port. - Host:
mail.yourdomain.com, Port:993. - Click Save.
POP3S (port 995) — optional, if enabled:
- Add Monitor →
TCP Port. - Host:
mail.yourdomain.com, Port:995. - Click Save.
Step 5: Monitor Individual Mailu Containers
For a more granular view, expose a health endpoint from each critical container and monitor it directly. Add to your docker-compose.override.yml:
services:
imap:
healthcheck:
test: ["CMD", "dovecot", "exec", "doveadm", "log", "find"]
interval: 30s
timeout: 10s
retries: 3
smtp:
healthcheck:
test: ["CMD", "postfix", "status"]
interval: 30s
timeout: 10s
retries: 3
These Docker health checks won't alert you externally, but pairing them with Vigilmon's TCP checks gives you both internal container state and external reachability in a single dashboard.
Step 6: Rspamd Web UI Monitoring (Optional)
Mailu includes Rspamd for spam filtering. If Rspamd's web UI is exposed (usually behind an authenticated proxy), you can monitor it:
- Add Monitor →
HTTP / HTTPS. - URL:
https://mail.yourdomain.com/rspamd. - Set Expected HTTP status to
200(or401if you haven't passed credentials — a 401 still confirms the container is running). - Click Save.
Step 7: Configure Alert Channels
- In Vigilmon, go to Alert Channels → Add Channel.
- Choose Email, Slack, or Webhook.
- For Slack: paste your incoming webhook URL.
- Assign all Mailu monitors to this channel.
- Set Consecutive failures before alert to
2on SMTP/IMAP monitors to suppress brief Docker restart noise.
Step 8: Status Page for Your Mail Domain
- In Vigilmon, go to Status Pages → New Status Page.
- Name it "Mail Services".
- Add your critical monitors: admin UI, SMTP, IMAP, webmail.
- Publish and bookmark the URL for your support team.
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Admin UI | https://mail.yourdomain.com/admin | admin container crash |
| Webmail | https://mail.yourdomain.com/webmail | Webmail container crash |
| Health check | https://mail.yourdomain.com/health | front nginx container down |
| SMTP | :25 | Inbound delivery broken |
| Submission | :587 | Outbound email broken |
| SMTPS | :465 | Secure submission broken |
| IMAP | :143 | Mail retrieval broken |
| IMAPS | :993 | Secure IMAP broken |
| POP3S | :995 | POP3 retrieval broken |
| Rspamd UI | /rspamd | Spam filter container crash |
| SSL certificate | All HTTPS monitors | Let's Encrypt renewal failure |
Mailu's multi-container architecture means failures can be isolated to a single component — or cascade across the whole stack. With Vigilmon monitoring every layer, you'll know exactly which container failed and how it's affecting your users.
Get started free at vigilmon.online — no credit card, monitors start running in under a minute.