Complete email infrastructure management with built-in webmail, CalDAV/CardDAV, and multi-server support.
Mail is a comprehensive email management panel that provides:
- Mail Server Management: Postfix, Dovecot, SpamAssassin, ClamAV, etc.
- Built-in Webmail: Server-side rendered, GPG support, Sieve filters
- CalDAV/CardDAV: Calendar and contacts server
- Mailing Lists: Built-in mailing list manager
- Multi-server: Manage multiple mail servers with different roles
- Multi-tenant: Support for users and organizations
- Virtual domains and mailboxes
- Email aliases and forwards
- DKIM, SPF, and DMARC support
- GPG/PGP key management
- Sieve mail filtering
- Mail archiving and retention
- Primary MX: Main server with local mailboxes
- Backup MX: Secondary relay, queues during outages
- Satellite: Internal relay only
- Outbound Gateway: Dedicated outbound mail
- Smarthost: Accepts from satellites
- Webmail interface
- CalDAV/CardDAV server
- Mailing list manager
- Push notifications
- Progressive Web App (PWA)
- Let's Encrypt automation
- Optional SnappyMail or Roundcube
- Optional DNS management (bind9/PowerDNS)
- LDAP/Active Directory support
- OIDC authentication
- Linux, FreeBSD, macOS, or Windows
- AMD64 or ARM64 architecture
- Root/sudo access required
- Supported distributions:
- Alpine Linux
- Debian/Ubuntu
- RHEL/CentOS/Rocky/Alma
- FreeBSD
# Download latest release
curl -sL https://mail.apimgr.us/install.sh | sudo bash
# Or with Docker
docker run -p 64500:64500 ghcr.io/apimgr/mail:latest
# Access setup wizard
# The panel will display a setup URL with token on first run# Download binary
wget https://github.com/apimgr/mail/releases/latest/download/mail-linux-amd64
chmod +x mail-linux-amd64
sudo mv mail-linux-amd64 /usr/local/bin/mail
# Run setup
sudo mail server setupConfiguration is stored in /etc/apimgr/mail/server.yml (or database in cluster mode).
server:
port: 64500
fqdn: mail.example.com
database:
driver: sqliteserver:
port: 64500
fqdn: panel.example.com
database:
driver: postgres
host: db.example.com
port: 5432
name: mail
username: mail
password: ${DB_PASSWORD}Access at https://your-server:64500/admin (setup token shown on first run).
- Manage mail servers
- Configure domains and mailboxes
- View queue and logs
- Monitor statistics
Access at https://your-server:64500/webmail
- Read and compose email
- Manage folders and filters
- Configure GPG keys
- Calendar and contacts
REST API at https://your-server:64500/api/v1/
- Manage domains and mailboxes
- Monitor server status
- Access mail statistics
- server.db: Server config, sessions, audit logs
- users.db: User accounts, mail data, calendars
Panel manages multiple mail servers via mail-agent:
Panel Nodes (cluster)
↓ manages ↓
Mail Servers (agents)
- Primary MX
- Backup MX
- Satellite
Full documentation available at https://mail.apimgr.us/docs
- Issues: https://github.com/apimgr/mail/issues
- Discussions: https://github.com/apimgr/mail/discussions
- Documentation: https://mail.apimgr.us/docs
MIT License - see LICENSE.md
- Docker (REQUIRED - no local Go installation needed)
- GNU Make
# Development build
make dev
# Run tests
make test
# Build for all platforms
make buildsrc/ # All Go source code
docker/ # Docker files
tests/ # Test scripts
docs/ # ReadTheDocs documentation
# Run all tests
cd tests && ./run_tests.sh
# Docker testing
cd tests && ./docker.sh
# Incus testing
cd tests && ./incus.sh- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
make test - Submit a pull request
- All code must work with CGO_ENABLED=0
- Use container-only development (never local
gocommands) - Follow AI.md specification exactly
- Server-side rendering only (no React/Vue)
- Mobile-first responsive design
- Postfix - SMTP server
- Dovecot - IMAP/POP3 server
- SpamAssassin - Spam filter
- ClamAV - Antivirus
Built with pure Go using:
- chi router
- modernc.org/sqlite (CGO-free SQLite)
- pgx (PostgreSQL driver)
- go-webauthn (passkey support)
- And many other excellent libraries
Official Site: https://mail.apimgr.us Repository: https://github.com/apimgr/mail