Deploying Zimbra Collaboration
Introduction
Zimbra Collaboration is an enterprise-grade email and collaboration platform that provides email, calendaring, contacts, tasks, and file sharing capabilities. As an open-source alternative to Microsoft Exchange and Google Workspace, Zimbra gives organizations complete control over their communication infrastructure.
Zimbra combines a powerful mail transfer agent (MTA) with a modern web client, providing a full-featured collaboration suite that can be self-hosted. The platform serves millions of mailboxes worldwide across enterprises, government agencies, and service providers.
Key highlights of Zimbra Collaboration:
- Full Email Suite: IMAP, POP3, and SMTP with advanced filtering and organization
- Web Client: Modern, responsive webmail interface with offline support
- Calendaring: Shared calendars, meeting scheduling, and resource booking
- Contacts: Address book with sharing and distribution lists
- Tasks: Task management with reminders and sharing capabilities
- File Sharing: Document storage with sharing and collaboration features
- Mobile Sync: ActiveSync support for mobile devices
- Admin Console: Web-based administration for user and system management
- LDAP Integration: Directory services for user authentication
- Anti-Spam/Virus: Built-in protection with SpamAssassin and ClamAV
- Backup: Integrated backup and restore capabilities
This guide walks through deploying Zimbra Collaboration on Klutch.sh using Docker, providing your organization with a self-hosted email and collaboration platform.
Why Deploy Zimbra on Klutch.sh
Deploying Zimbra on Klutch.sh provides several advantages for enterprise collaboration:
Data Sovereignty: Keep your organization’s email and data under your control on infrastructure you manage.
HTTPS by Default: Automatic SSL certificates for secure webmail and client connections.
Persistent Storage: Reliable storage for mailboxes, calendars, and attachments.
Scalable Resources: Allocate CPU, memory, and storage based on your organization’s size.
Custom Domains: Use your organization’s domain for professional email addresses.
Always Available: Email services remain accessible 24/7 without managing physical infrastructure.
Prerequisites
Before deploying Zimbra on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- A domain name with DNS management access
- Understanding of email infrastructure (MX records, SPF, DKIM)
- Basic familiarity with Docker and containerization
- Knowledge of email server administration
Understanding Zimbra Architecture
Zimbra consists of several integrated components:
Mailbox Server: Handles email storage, indexing, and the web client.
MTA (Postfix): Mail transfer agent for sending and receiving email.
LDAP Server: Directory services for user authentication and configuration.
Proxy Server: Handles client connections and load balancing.
Anti-Spam/Virus: SpamAssassin and ClamAV for email filtering.
Store: Message storage with indexing via Lucene.
Preparing Your Repository
Create a GitHub repository for your Zimbra deployment.
Repository Structure
zimbra-deploy/├── Dockerfile├── config/│ └── localconfig.xml└── .dockerignoreCreating the Dockerfile
Create a Dockerfile for Zimbra:
FROM ubuntu:20.04
# Set environment variablesENV DEBIAN_FRONTEND=noninteractiveENV ZIMBRA_HOSTNAME=${ZIMBRA_HOSTNAME}ENV ZIMBRA_DOMAIN=${ZIMBRA_DOMAIN}ENV ADMIN_PASSWORD=${ADMIN_PASSWORD}
# Install dependenciesRUN apt-get update && apt-get install -y \ wget \ curl \ dnsutils \ netcat \ sudo \ rsyslog \ && rm -rf /var/lib/apt/lists/*
# Download Zimbra installerWORKDIR /tmpRUN wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz \ && tar xzf zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
# Copy configuration scriptCOPY config/install_config.txt /tmp/install_config.txt
# Expose Zimbra portsEXPOSE 25 80 110 143 443 465 587 993 995 7071 8443
# Volume for mail storageVOLUME ["/opt/zimbra"]
# Start scriptCOPY scripts/start.sh /start.shRUN chmod +x /start.sh
CMD ["/start.sh"]Environment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
ZIMBRA_HOSTNAME | Yes | - | Fully qualified hostname (e.g., mail.example.com) |
ZIMBRA_DOMAIN | Yes | - | Email domain (e.g., example.com) |
ADMIN_PASSWORD | Yes | - | Admin console password |
TIMEZONE | No | UTC | Server timezone |
RELAY_HOST | No | - | External SMTP relay if needed |
Deploying Zimbra on Klutch.sh
- A Record: Point mail.yourdomain.com to your Klutch.sh app
- MX Record: Set mail.yourdomain.com as your mail exchanger
- SPF Record: Add appropriate SPF record for email authentication
- PTR Record: Configure reverse DNS if possible
- Select HTTP as the traffic type
- Set the internal port to 443 for the web client
Configure DNS Records
Before deployment, set up your domain’s DNS:
Push Your Repository to GitHub
Initialize and push your configuration to GitHub.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project named “zimbra” or “mail”.
Create a New App
Within your project, create a new app and connect your GitHub repository.
Configure HTTP Traffic
Set up HTTP for the web interface:
Note: Email ports (25, 587, 993, etc.) require additional configuration.
Set Environment Variables
Configure the following:
| Variable | Value |
|---|---|
ZIMBRA_HOSTNAME | mail.yourdomain.com |
ZIMBRA_DOMAIN | yourdomain.com |
ADMIN_PASSWORD | Secure admin password |
TIMEZONE | Your timezone |
Attach Persistent Volumes
Add storage for Zimbra data:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/opt/zimbra | 100+ GB | Mailboxes, configuration, and logs |
/opt/zimbra/backup | 50+ GB | Backup data |
Deploy Your Application
Click Deploy to build and start Zimbra.
Complete Initial Setup
Access the admin console at https://your-app-name.klutch.sh:7071 to complete configuration.
Initial Configuration
Admin Console Setup
- Navigate to the admin console URL
- Log in with admin@yourdomain.com and your admin password
- Configure global settings, domains, and distribution policies
Creating User Accounts
- In the admin console, navigate to Home > Manage > Accounts
- Click “New” to create user accounts
- Set passwords and configure mailbox quotas
Configuring Email Authentication
Set up DKIM signing:
- Generate DKIM keys through the admin console
- Add the DKIM TXT record to your DNS
- Enable DKIM signing for outgoing mail
Email Client Configuration
Webmail Access
Users access webmail at https://mail.yourdomain.com
Desktop Client Settings
IMAP:
- Server: mail.yourdomain.com
- Port: 993 (SSL)
- Username: full email address
SMTP:
- Server: mail.yourdomain.com
- Port: 587 (STARTTLS)
- Authentication: Required
Mobile Device Setup
Enable ActiveSync for mobile sync:
- Configure ActiveSync in admin console
- Use Exchange account type on mobile devices
- Enter server and credentials
Troubleshooting Common Issues
Email Not Sending/Receiving
Solutions:
- Verify MX records are correctly configured
- Check SPF and DKIM records
- Review mail queue and logs in admin console
- Verify port 25 is accessible
Webmail Not Loading
Solutions:
- Confirm HTTPS port is correctly mapped
- Check SSL certificate status
- Review proxy logs for errors
Users Cannot Authenticate
Solutions:
- Verify LDAP service is running
- Check user account status
- Review authentication logs
Security Considerations
Email Security
- Enable TLS for all connections
- Configure SPF, DKIM, and DMARC
- Enable rate limiting to prevent abuse
- Regular security updates
Admin Access
- Use strong admin passwords
- Limit admin console access by IP if possible
- Enable two-factor authentication
- Regular audit of admin actions
Additional Resources
Conclusion
Deploying Zimbra Collaboration on Klutch.sh provides your organization with a comprehensive email and collaboration platform under your control. With email, calendaring, contacts, and file sharing in one integrated suite, Zimbra offers a powerful alternative to cloud-based collaboration services while keeping your data on infrastructure you manage.