Getting started
This document will show you how to get started with the Poste.io mail server. In 5 minutes you will have your email server up and running, sending and receiving emails.
Requirements
For a fully functional, internet-ready email server, you need a few things:
- any 64bit linux distribution running in a virtual machine or dedicated server
- CPU and free RAM to run Spamassassin and Clamav. Other components are less CPU and memory hungry
- Docker engine up and running - see how to install docker engine
- public IP address
- ability to change IP address's reverse DNS entry - contact your service provider if you are unable to do this yourself
- full access to domain DNS administration
Downloading and running Poste.io
There are two versions of product, PRO and FREE image.
poste.io/mailserver # (from https://poste.io docker server)
analogic/poste.io # (from https://hub.docker.com)
Both versions share the same data directory structure - the only difference when using the PRO version is that you log in to our private Docker repository.
$ docker login -u "username" -p "password" https://poste.io $ docker run \ --net=host \ -e TZ=Europe/Prague \ -v /your-data-dir/data:/data \ --name "mailserver" \ -h "mail.example.com" \ -t poste.io/mailserver
You will be using image from public Docker hub.
$ docker run \ --net=host \ -e TZ=Europe/Prague \ -v /your-data-dir/data:/data \ --name "mailserver" \ -h "mail.example.com" \ -t analogic/poste.io
Docker arguments explained
- --net=host (recomended) mailserver will use host network stack (see https://docs.docker.com/network/host/)
- in this mode host's firewall will work correctly
- connection source IP is not hidden by userland-proxy
- ipv6 working correctly
- network schemes explanation
Ports which are opened by poste.io:
Port number | Purpose |
---|---|
25 | SMTP - mostly processing incoming mails from remote mail servers |
80 | HTTP - redirect to https (see options) and authentication for Let's encrypt service |
110 | POP3 - standard protocol for accessing mailbox, STARTTLS is required before client auth |
143 | IMAP - standard protocol for accessing mailbox, STARTTLS is required before client auth |
443 | HTTPS - access to administration or webmail client |
465 | SMTPS - Legacy SMTPs port |
587 | MSA - SMTP port primarily used by email clients after STARTTLS and auth |
993 | IMAPS - alternative port for IMAP with encryption from the start of the connection |
995 | POP3S - POP3 port with encryption from the start of the connection |
4190 | Sieve - remote sieve settings |
-e TZ=Europe/Prague Timezone settings for correct datetime
-v /your-data-dir/data:/data Mounts the data directory from the host system. User database, emails, logs, all will end up in this directory for easy backup.
--name "mailserver" Run poste.io as a container with a defined name
-h "mail.example.com" Hostname for your mailserver
-t analogic/poste.io Image name, differs for PRO and FREE version
Optional arguments
-e "HTTPS=OFF" To disable all redirects to encrypted HTTP, useful if you are using some kind of reverse proxy (put this argument before image name!)
-e "HTTP_PORT=8080" Custom HTTP port. Note that you will need to handle Let's Encrypt requests on port 80, so if you're using a reverse proxy setup, you'll need to forward the /.well-known/ folder to this port.
-e "HTTPS_PORT=4433" Custom HTTPS port.
-e "DISABLE_CLAMAV=TRUE" To disable ClamAV, it is useful for low mem usage.
-e "DISABLE_RSPAMD=TRUE" To disable Rspamd, it is useful for low mem usage.
-e "DISABLE_ROUNDCUBE=TRUE" To disable Roundcube webmail.
-e "ELASTICSEARCH=123.123.123.123:9200" Elasticsearch integration
-p 4190:4190 If you want to use clients with the ability to manage Sieve filters externally, you will also need to open port 4190