📙 The complete installation guide is available on my website.
❗ Change variables in the .env
to meet your requirements.
To generate a 128-bit security key for the SECRET_KEY
variable, use the following OpenSSL command:
openssl rand -hex 16
💡 Note that the .env
file should be in the same directory as mailu-traefik-letsencrypt-docker-compose.yml
.
Set up the following DNS and firewall configurations for our Mailu email server on yourdomain.com:
mailu.yourdomain.com
→[Server IP]
admin.mailu.yourdomain.com
→[Server IP]
webmail.mailu.yourdomain.com
→[Server IP]
webdav.mailu.yourdomain.com
→[Server IP]
traefik.mailu.yourdomain.com
→[Server IP]
yourdomain.com MX
→mailu.yourdomain.com (Priority: 10)
TXT yourdomain.com
→v=spf1 a mx ~all
TXT mail._domainkey.yourdomain.com
→(DKIM Key)
TXT _dmarc.yourdomain.com
→v=DMARC1; p=none; rua=mailto:admin@yourdomain.com
[Server IP]
→mailu.yourdomain.com
- SMTP: 25, 465, 587
- IMAP/POP3: 143, 993, 110, 995
- Sieve: 4190
- Web Traffic: 80, 443
Replace [Server IP]
and (DKIM Key)
with the appropriate values for your server.
Create networks for your services before deploying the configuration using the commands:
docker network create traefik-network
Deploy Mailu using Docker Compose:
docker compose -f mailu-traefik-letsencrypt-docker-compose.yml -p mailu up -d
Set password for administrator account. Replace PASSWORD
with a strong, secure password:
docker compose -p mailu exec admin flask mailu admin admin yourdomain.com PASSWORD
I’m Vladimir Mikhalev, the Docker Captain, but my friends can call me Valdemar.
🌐 My website with detailed IT guides
🎬 Follow me on YouTube
🐦 Follow me on Twitter
🎨 Follow me on Instagram
🧵 Follow me on Threads
🐘 Follow me on Mastodon
🧊 Follow me on Bluesky
🎸 Follow me on Facebook
🎥 Follow me on TikTok
💻 Follow me on LinkedIn
🐈 Follow me on GitHub
👾 Chat with IT pros on Discord
📧 Reach me at ask@sre.gg
💎 Support on GitHub
🏆 Support on Patreon
🥤 Support on BuyMeaCoffee
🍪 Support on Ko-fi
💖 Support on PayPal