Portainer Templates logo

Portainer Templates

Poste.io

Stack

Mail

Full stack mailserver solution with TLS support. POP3s, SMTP(s), IMAPs, RSPAMD, Clamav, Roundcube(HTTPS), SPF, DKIM with simple installation and web administration.

Image details

Pulls: 26.2M
Architecture: amd64
Image size: 402 MB
Latest: 2.5.14
User: analogic
Created: Mar 25, 2015
Updated: 1 month ago
Status: active

Configuration

Type
Compose
Platform
linux
Image
analogic/poste.io
Ports
82:80445:44325:25110:110143:143587:587993:993995:9954190:4190
Volumes
/etc/localtime : /etc/localtime/opt/www/.well-known : /portainer/Files/AppData/Config/poste/data/nginx/html/.well-known/dataroot : /portainer/Files/AppData/Config/poste/data/mailserver
Env vars
TZ=Europe/Athensh=mail.[some-domain].comHTTP_PORT=82HTTPS_PORT=445DISABLE_CLAMAV=TRUEDISABLE_RSPAMD=TRUE
Restart
always
Source

Template by xneo1·Source

Standalone Install

Select an install method, to see config/commands for deploying Poste.io

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Poste.io, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo
Original stackfile

The compose file this template deploys, straight from its repo:

services:

  mailserver:
    image: analogic/poste.io
    container_name: poste
    restart: always
    ports:
      - "82:80"
      - "445:443"
      - "25:25"
      - "110:110"
      - "143:143"
      - "587:587"
      - "993:993"
      - "995:995"
      - "4190:4190"
    environment:
      - TZ=Europe/Athens
      - h=mail.[some-domain].com # enter the email server hosting address
      - HTTP_PORT=82
      - HTTPS_PORT=445
      - DISABLE_CLAMAV=TRUE
      - DISABLE_RSPAMD=TRUE
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /portainer/Files/AppData/Config/poste/data/nginx/html/.well-known:/opt/www/.well-known
      - /portainer/Files/AppData/Config/poste/data/mailserver:/dataroot

Or deploy it directly from the source:

git clone https://github.com/xneo1/portainer_templates
cd portainer_templates
docker compose -f Template/Stack/posteio.yml up -d

More install options in our documentation.

Poste.io - complete mailserver built in one container

Full stack mail server solution with SSL TLS support. POP3s, SMTP(s), IMAPs, RSPAMD, Clamav, Roundcube(HTTPS), SPF, DKIM with easy installation and web administration.
  • Pro version demo running at https://demo.poste.io/admin/login#admin@poste.io;admin
  • For instructions how to install please see https://poste.io/doc/

Native features

  • Let's encrypt for free and automatic TLS certs!
  • SMTP routing (redirects all outgoing emails to the smarthost)
  • SRS (fix redirects to follow valid SPF)
  • "From" header check to prevent sender spoofing within mailserver users (toggleable per user)
  • Remove redundant headers and hide authenticated sender IP for privacy
  • Inbound antispam&antivirus (outbound at PRO)
  • Automated Trash and Junk folders cleaning
  • Relay limits with optional blocking prevents cases when one of your users computer got infected and tries to spam (PRO)
  • "Karma" for making spammers life harder and much slower (p0f for detecting senders system, dns/mx/reverse lookups, DNSBL)
  • Blacklist&Whitelist + automatic blocking for resources wasters
  • Quarantine folder inspectable through administration
  • Whole domain forwarding
  • Domain-bin aka catch-all address
  • DKIM setup through administration
  • Very detailed logs (searchable and viewable through administration PRO)
  • DMARC reports (PRO)
  • REST API and command line for emails and domains manipulation
  • Server and domain DNS Diagnostics, DNSBL check
  • Quota for users
  • Levels of administration rights: system admin, domain admin(PRO) and user
  • Default Sieve filters for redirect, copy, autoreply, out of office, custom

Screenshots

Web administration with email accounts and virtual domains:
Poste.io WebAdmin
Email process log in log viewer (PRO only):
Poste.io LogViewer

Want more?

Look at demo! https://demo.poste.io/admin/login#admin@poste.io;admin

I want one!

Please see https://poste.io

Serve Poste.io on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying poste-io.example.com to http://mailserver:80

Add this to your Caddyfile

poste-io.example.com {
	reverse_proxy http://mailserver:80
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs <container>
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Port already in use

If deployment fails with "Bind for 0.0.0.0:82 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :82
  • Stop the other service, or pick a different host port. In 82:80 only the left number is yours to change, the right one belongs to the app.

Running but the page won't load

The container is up but nothing appears in your browser.

  • Use your server's real IP: http://your-server-ip:82. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, mailserver can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 82

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /etc/localtime (and the same for the other mapped folders)

Image won't pull

Test the pull directly on the host: docker pull analogic/poste.io

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The always restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect <container> --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Stack won't deploy

Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.

  • YAML only accepts spaces for indentation, a single tab breaks the whole file.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A Compose stack

Poste.io is a Compose stack, a set of containers defined in one file and brought up together by Portainer, then started and stopped as a single app.

The app image

An image is the app packed up ready to go, everything Poste.io needs bundled into one download. This template pulls analogic/poste.io, which Docker fetches once (about 402 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. Poste.io's comes from Docker Hub, published by analogic.

Version tags

The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 2.5.14. Pin a specific tag if you would rather stay on one version.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, so it runs on regular x86 PCs and servers, though not ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. A mapping like 82:80 means it's reachable on port 82 of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, open http://your-server-ip:82 in a browser. It opens:

  • 82:80, likely the web interface
  • 445:443, likely the web interface
  • 25:25
  • 110:110
  • 143:143
  • 587:587
  • 993:993
  • 995:995
  • 4190:4190

Volumes

A volume is where Poste.io keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /etc/localtime from /etc/localtime on the host
  • /opt/www/.well-known from /portainer/Files/AppData/Config/poste/data/nginx/html/.well-known on the host
  • /dataroot from /portainer/Files/AppData/Config/poste/data/mailserver on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Poste.io takes 6 of them, all with defaults you can leave alone or tweak:

  • TZ, defaults to Europe/Athens
  • h, defaults to mail.[some-domain].com
  • HTTP_PORT, defaults to 82
  • HTTPS_PORT, defaults to 445
  • DISABLE_CLAMAV, defaults to TRUE
  • DISABLE_RSPAMD, defaults to TRUE

Restart policy

The restart policy here is always, so Docker brings Poste.io back up after a crash and again when the server reboots. Good for anything you want running around the clock. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Networking

Nothing custom is set, so Poste.io sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container mailserver. That's what you'll spot in the containers list and use in commands like docker logs mailserver.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Poste.io up. Add the template list to Portainer once, then deploying Poste.io is a click rather than a wall of config.