How mailserver2/mailserver works
Main Components Overview
[External Email Servers] <---> [Traefik Reverse Proxy] <---> [Mail Server Container]
• [Database] <-----------|
• [Redis] <--------------|
Detailed Component Architecture
[Traefik Reverse Proxy]
• > [Mail Server Container]
• > [Postfix] (SMTP Server)
• Handles incoming/outgoing email
• Port 25 (SMTP)
• Port 587 (Submission)
• Port 465 (SMTPS)
• > [Dovecot] (IMAP/POP3 Server)
• Handles email storage and retrieval
• Port 993 (IMAPS)
• Port 995 (POP3S)
• Port 4190 (ManageSieve)
• > [Rspamd] (Spam Filter)
• Anti-spam filtering
• DKIM/SPF/DMARC
• Web interface
• > [ClamAV] (Antivirus)
• Email virus scanning
• Auto-updates
• > [Unbound] (DNS Resolver)
• Local DNS resolution
• DNSSEC support
• > [Zeyple] (Email Encryption)
• GPG encryption
How email flows through the system:
[Incoming Email] --> [Traefik] --> [Postfix]
• v
• [Rspamd] --> [ClamAV]
• v
• [Dovecot] --> [Mail Storage]
• ^
[IMAP Clients] -----------------> [Dovecot]
Storage and Persistence
Persistent storage structure:
[/mnt/docker/mail/]
• > [postfix/] (Configuration and queues)
• > [dovecot/] (Email storage and config)
• > [clamav/] (Virus databases)
• > [rspamd/] (Spam filter data)
• > [ssl/] (SSL certificates)
• > [dkim/] (DKIM keys)
• > [vhosts/] (Virtual domains)
Authentication Flow
[Email Client]
• > [Dovecot Auth]
• v
• [Database/LDAP]
• v v
[Postfix] [Dovecot]
• External services (blue)
• Internal components (green)
• Storage systems (yellow)
• Security components (red)
Ports and protocols
• SMTP (25, 465, 587)
• IMAP (143, 993)
• POP3 (110, 995)
• Management (4190)
Security layers
• SSL/TLS termination
• Spam filtering
• Virus scanning
• DKIM/SPF/DMARC verification
Data persistence
• Database connections
• Volume mounts
• Configuration storage
Monitoring and management interfaces
• Rspamd web interface
• Postfixadmin
• Rainloop webmail