Skip to content

heyvaldemar/mailu-traefik-letsencrypt-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailu with Let's Encrypt Using Docker Compose

📙 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:

DNS Records

A Records

  • 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]

MX Record

  • yourdomain.com MXmailu.yourdomain.com (Priority: 10)

SPF Record

  • TXT yourdomain.comv=spf1 a mx ~all

DKIM Record

  • TXT mail._domainkey.yourdomain.com(DKIM Key)

DMARC Record

  • TXT _dmarc.yourdomain.comv=DMARC1; p=none; rua=mailto:admin@yourdomain.com

PTR Record

  • [Server IP]mailu.yourdomain.com

Firewall Ports to Open

  • 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

Administrator Account

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

Author

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

Communication

👾 Chat with IT pros on Discord
📧 Reach me at ask@sre.gg

Give Thanks

💎 Support on GitHub
🏆 Support on Patreon
🥤 Support on BuyMeaCoffee
🍪 Support on Ko-fi
💖 Support on PayPal