Docker Image For Xeams

Overview

Xeams can be deployed in a Docker environment to provide flexible, isolated email filtering. Containerization is a popular choice for simplified deployment and portability.

1. Prerequisites

  • Docker Installed: Ensure Docker Desktop or Docker Engine is running on your host.
  • Docker Image: Visit the Github Respository to download necessary files.
  • Persistent Storage: You must mount a volume for the /opt/Xeams directory to ensure configurations and emails are not lost when the container restarts.

2. Common Ports to Map

To function correctly, you must map several ports from the container to your host:

Ports 25, 80, 110, 143, 443, 465, 587, 993, 995, and 5272 available on your host machine

3. Installation Steps

  • Download the Dockerfile, along with the docker-entrypoint.sh script into a desired directory.
  • Execute the following command:
    docker build -t xeams-server .
  • Refer to the Readme file different options.
  • After running the container, open your browser to http://localhost:5272, which will open up Xeams configuration screen.

4. Critical Considerations

  • Sender's IP: Because Docker often uses a bridge network, Xeams may see all incoming traffic as coming from the Docker Gateway IP, and therefore, most IP based filtering rule will not work. To fix this, consider using network_mode: "host" in your configuration so Xeams can see the real sender IPs. Refer to this document for details. Note that currently, Docker supports this mode only on Linux.
  • Upgrading and Restart: Xeams is able to restart itself on a normal machine, but Docker containers cannot do that. Once a container process termines, you must restart it manually. Upgrading to a newer version of Xeams is a two-step process: downloading necessary files, and then restarting. Since a Dockerized container cannot restart, you will not be able to upgrade Xeams to the latest version. You will have to remove the Docker image and pull it again.
  • Memory Usage: Ensure your container has at least 2GB of RAM allocated for stable performance, especially if you enable heavy filtering rules.