Mailu

Host your own secure email server with this set of Docker images. Features include webmail, advanced routing, robust antispam, and comprehensive admin tools.

Take control of your email infrastructure with a comprehensive, open-source mail server packaged entirely as Docker images. This solution provides an easily deployable and highly maintainable alternative to complex traditional setups, ensuring you retain full ownership of your data without relying on proprietary software or hidden trackers.

Key benefits include:

  • Standard and Advanced Email Protocols: Fully supports IMAP, IMAP+, SMTP, and Submission, complete with auto-configuration profiles, domain aliases, and custom routing.
  • Robust Security and Antispam: Protects your communications with enforced TLS, DANE, MTA-STS, outgoing DKIM, and an integrated anti-virus scanner. It also blocks spam using auto-learning, greylisting, DMARC, and SPF.
  • Comprehensive Access and Management: Offers multiple webmail interfaces, a dedicated administration panel, per-domain delegation, and user features like auto-replies and fetched accounts.

Directory Structure

mailu
certs
data
dkim
filter
mail
mailqueue
overrides
dovecot
nginx
postfix
roundcube
rspamd
redis
webmail
.env
docker-compose.yml

docker-compose.yml

services:
  redis:
    image: redis:alpine
    restart: always
    volumes:
      - ./redis:/data
    networks:
      - default

  front:
    image: ghcr.io/mailu/nginx:2.0
    restart: always
    env_file: .env
    logging:
      driver: json-file
    ports:
      - "80:80"
      - "443:443"
      - "25:25"
      - "465:465"
      - "587:587"
      - "110:110"
      - "995:995"
      - "143:143"
      - "993:993"
    volumes:
      - ./certs:/certs
      - ./overrides/nginx:/overrides:ro
    networks:
      - default

  resolver:
    image: ghcr.io/mailu/unbound:2.0
    restart: always
    env_file: .env
    networks:
      default:
        ipv4_address: 192.168.203.254

  admin:
    image: ghcr.io/mailu/admin:2.0
    restart: always
    env_file: .env
    volumes:
      - ./data:/data
      - ./dkim:/dkim
    depends_on:
      - redis
    networks:
      - default

  imap:
    image: ghcr.io/mailu/dovecot:2.0
    restart: always
    env_file: .env
    volumes:
      - ./mail:/mail
      - ./overrides/dovecot:/overrides:ro
    depends_on:
      - front
    networks:
      - default

  smtp:
    image: ghcr.io/mailu/postfix:2.0
    restart: always
    env_file: .env
    volumes:
      - ./mailqueue:/queue
      - ./overrides/postfix:/overrides:ro
    depends_on:
      - front
    networks:
      - default

  antispam:
    image: ghcr.io/mailu/rspamd:2.0
    restart: always
    env_file: .env
    volumes:
      - ./filter:/var/lib/rspamd
      - ./dkim:/dkim:ro
      - ./overrides/rspamd:/overrides:ro
    depends_on:
      - front
      - redis
    networks:
      - default

  webmail:
    image: ghcr.io/mailu/webmail:2.0
    restart: always
    env_file: .env
    volumes:
      - ./webmail:/data
      - ./overrides/roundcube:/overrides:ro
    depends_on:
      - front
    networks:
      - default

networks:
  default:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 192.168.203.0/24

.env

# Core Configuration
SECRET_KEY=change_this_to_a_very_long_random_string
SUBNET=192.168.203.0/24
DOMAIN=example.com
HOSTNAME=mail.example.com
POSTMASTER=admin

# TLS Configuration (letsencrypt, cert, mail, notls)
TLS_FLAVOR=letsencrypt

# Admin Interface
ADMIN=true
WEB_ADMIN=/admin
SITENAME=Mailu

# Webmail (roundcube, snappymail, none)
WEBMAIL=roundcube
WEBMAIL_PATH=/webmail

# API
API=true

# Antivirus (Disabled by default to save resources)
ANTIVIRUS=false

# Mail Settings
MESSAGE_SIZE_LIMIT=50000000
PASSWORD_SCHEME=PBKDF2
LOG_LEVEL=INFO

# Advanced
# RECIPIENT_DELIMITER=+
# DMARC_RUA=mailto:admin@example.com
# DMARC_RUF=mailto:admin@example.com
Categories:

Share:

Ad
Favicon

 

  
 

Similar to Mailu

Favicon

 

  
  
Favicon

 

  
  
Favicon