From c2dbb8d3924b7c559b59802b67f4a5f2a548d2b5 Mon Sep 17 00:00:00 2001 From: Tero Date: Sat, 5 Sep 2026 09:56:08 +0300 Subject: [PATCH] First commit --- .env.example | 8 ++++++++ README.md | 12 ++++++++++++ docker-compose.yml | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 .env.example create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..73c918c --- /dev/null +++ b/.env.example @@ -0,0 +1,8 @@ +# Incoming mail (IMAP) +IMAP_HOST=imap.example.com +IMAP_PORT=143 + +# Outgoing mail (SMTP with STARTTLS) +SMTP_HOST=smtp.example.com +SMTP_PORT=587 +SMTP_AUTH_TYPE=PLAIN \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1179bb6 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Roundcube + +1. Copy `.env.example` to `.env` and replace the example mail-server values. +2. Start the container: + + ```powershell + docker compose up -d + ``` + +3. Open [http://localhost:9002](http://localhost:9002) and sign in with your mail credentials. + +The container publishes Roundcube on host port `9002`. SMTP uses port `587` by default and the `tls://` server prefix, which makes Roundcube negotiate STARTTLS. Its database is retained in the named `roundcube-db` volume. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2b8f1a9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +services: + roundcube: + image: roundcube/roundcubemail:latest + container_name: roundcube + restart: unless-stopped + ports: + - "9002:80" + environment: + ROUNDCUBEMAIL_DEFAULT_HOST: ${IMAP_HOST:-imap.example.com} + ROUNDCUBEMAIL_DEFAULT_PORT: ${IMAP_PORT:-143} + ROUNDCUBEMAIL_SMTP_SERVER: tls://${SMTP_HOST:-smtp.example.com} + ROUNDCUBEMAIL_SMTP_PORT: ${SMTP_PORT:-587} + ROUNDCUBEMAIL_SMTP_USER: "%u" + ROUNDCUBEMAIL_SMTP_PASS: "%p" + ROUNDCUBEMAIL_SMTP_AUTH_TYPE: ${SMTP_AUTH_TYPE:-PLAIN} + volumes: + - roundcube-db:/var/roundcube/db + +volumes: + roundcube-db: \ No newline at end of file