112 lines
1.7 KiB
Markdown
112 lines
1.7 KiB
Markdown
# UPDATE.md — Keeping the Mail Server Up to Date
|
|
|
|
This document describes how to keep the mail server setup up to date:
|
|
|
|
- docker-mailserver (DMS)
|
|
- Snappymail
|
|
- Amavis / SpamAssassin
|
|
- ClamAV
|
|
- Postfix / Dovecot
|
|
- TLS via host-level nginx
|
|
|
|
---
|
|
|
|
## 1. Update Docker Images
|
|
|
|
Run regularly (e.g. weekly or monthly):
|
|
|
|
```bash
|
|
docker pull mailserver/docker-mailserver:12
|
|
docker pull ghcr.io/the-djmaze/snappymail:latest
|
|
```
|
|
|
|
Then restart the stack:
|
|
|
|
```bash
|
|
docker compose down
|
|
docker compose up -d
|
|
```
|
|
|
|
---
|
|
|
|
## 2. ClamAV Signature Updates
|
|
|
|
ClamAV updates automatically via `freshclam` inside the container.
|
|
|
|
Check status:
|
|
|
|
```bash
|
|
docker exec mailserver freshclam --version
|
|
```
|
|
|
|
---
|
|
|
|
## 3. SpamAssassin / Amavis Updates
|
|
|
|
SpamAssassin rules are updated automatically via `sa-update`.
|
|
|
|
Verify:
|
|
|
|
```bash
|
|
docker exec mailserver sa-update -D
|
|
```
|
|
|
|
---
|
|
|
|
## 4. Restart After Configuration Changes
|
|
|
|
If anything under `config/` is modified:
|
|
|
|
```bash
|
|
docker exec mailserver setup restart
|
|
```
|
|
|
|
or:
|
|
|
|
```bash
|
|
docker compose restart mailserver
|
|
```
|
|
|
|
---
|
|
|
|
## 5. TLS Certificates
|
|
|
|
TLS termination is handled by host-level nginx.
|
|
ACME renewal is automatic.
|
|
No action required inside the mailserver container.
|
|
|
|
---
|
|
|
|
## 6. Health Check
|
|
|
|
Run the custom health checker:
|
|
|
|
```bash
|
|
./tools/health_check.sh
|
|
```
|
|
|
|
It verifies DNS, TLS, Postfix, Dovecot, Amavis, ClamAV, and queue status.
|
|
|
|
---
|
|
|
|
## 7. Full System Upgrade (optional)
|
|
|
|
On the host:
|
|
|
|
```bash
|
|
apt update && apt upgrade
|
|
reboot
|
|
```
|
|
|
|
Docker containers restart automatically.
|
|
|
|
---
|
|
|
|
## Summary
|
|
|
|
- Pull updated images regularly
|
|
- Restart after pulling
|
|
- ClamAV and SpamAssassin update themselves
|
|
- TLS certificates renew automatically
|
|
- Use the health checker to verify system status
|