Skip to content

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
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile for Zimbra:

FROM ubuntu:20.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV ZIMBRA_HOSTNAME=${ZIMBRA_HOSTNAME}
ENV ZIMBRA_DOMAIN=${ZIMBRA_DOMAIN}
ENV ADMIN_PASSWORD=${ADMIN_PASSWORD}
# Install dependencies
RUN apt-get update && apt-get install -y \
wget \
curl \
dnsutils \
netcat \
sudo \
rsyslog \
&& rm -rf /var/lib/apt/lists/*
# Download Zimbra installer
WORKDIR /tmp
RUN 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 script
COPY config/install_config.txt /tmp/install_config.txt
# Expose Zimbra ports
EXPOSE 25 80 110 143 443 465 587 993 995 7071 8443
# Volume for mail storage
VOLUME ["/opt/zimbra"]
# Start script
COPY scripts/start.sh /start.sh
RUN chmod +x /start.sh
CMD ["/start.sh"]

Environment Variables Reference

VariableRequiredDefaultDescription
ZIMBRA_HOSTNAMEYes-Fully qualified hostname (e.g., mail.example.com)
ZIMBRA_DOMAINYes-Email domain (e.g., example.com)
ADMIN_PASSWORDYes-Admin console password
TIMEZONENoUTCServer timezone
RELAY_HOSTNo-External SMTP relay if needed

Deploying Zimbra on Klutch.sh

    Configure DNS Records

    Before deployment, set up your domain’s DNS:

    • 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

    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:

    • Select HTTP as the traffic type
    • Set the internal port to 443 for the web client

    Note: Email ports (25, 587, 993, etc.) require additional configuration.

    Set Environment Variables

    Configure the following:

    VariableValue
    ZIMBRA_HOSTNAMEmail.yourdomain.com
    ZIMBRA_DOMAINyourdomain.com
    ADMIN_PASSWORDSecure admin password
    TIMEZONEYour timezone

    Attach Persistent Volumes

    Add storage for Zimbra data:

    Mount PathRecommended SizePurpose
    /opt/zimbra100+ GBMailboxes, configuration, and logs
    /opt/zimbra/backup50+ GBBackup 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

  1. Navigate to the admin console URL
  2. Log in with admin@yourdomain.com and your admin password
  3. Configure global settings, domains, and distribution policies

Creating User Accounts

  1. In the admin console, navigate to Home > Manage > Accounts
  2. Click “New” to create user accounts
  3. Set passwords and configure mailbox quotas

Configuring Email Authentication

Set up DKIM signing:

  1. Generate DKIM keys through the admin console
  2. Add the DKIM TXT record to your DNS
  3. 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:

  1. Configure ActiveSync in admin console
  2. Use Exchange account type on mobile devices
  3. 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.