From c4b2e587ac117a3aa9f8378190bd7b3f33d6d812 Mon Sep 17 00:00:00 2001 From: Aaron Spettl Date: Mon, 6 Aug 2018 21:25:11 +0200 Subject: [PATCH 1/3] Better defaults for smtp settings, fixes #24 --- php-apache/docker-entrypoint.sh | 2 ++ php-fpm/docker-entrypoint.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/php-apache/docker-entrypoint.sh b/php-apache/docker-entrypoint.sh index 685317e..59ef659 100755 --- a/php-apache/docker-entrypoint.sh +++ b/php-apache/docker-entrypoint.sh @@ -67,6 +67,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['default_port'] = '${ROUNDCUBEMAIL_DEFAULT_PORT}'; \$config['smtp_server'] = '${ROUNDCUBEMAIL_SMTP_SERVER}'; \$config['smtp_port'] = '${ROUNDCUBEMAIL_SMTP_PORT}'; + \$config['smtp_user'] = '%u'; + \$config['smtp_pass'] = '%p'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['plugins'] = ['${ROUNDCUBEMAIL_PLUGINS_PHP}']; \$config['zipdownload_selection'] = true; diff --git a/php-fpm/docker-entrypoint.sh b/php-fpm/docker-entrypoint.sh index 21d27ae..5bc6378 100755 --- a/php-fpm/docker-entrypoint.sh +++ b/php-fpm/docker-entrypoint.sh @@ -67,6 +67,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['default_port'] = '${ROUNDCUBEMAIL_DEFAULT_PORT}'; \$config['smtp_server'] = '${ROUNDCUBEMAIL_SMTP_SERVER}'; \$config['smtp_port'] = '${ROUNDCUBEMAIL_SMTP_PORT}'; + \$config['smtp_user'] = '%u'; + \$config['smtp_pass'] = '%p'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['plugins'] = ['${ROUNDCUBEMAIL_PLUGINS_PHP}']; \$config['zipdownload_selection'] = true; From 144c09087ac10ff286ac1d029a7ffe589ca0eef4 Mon Sep 17 00:00:00 2001 From: Aaron Spettl Date: Mon, 6 Aug 2018 21:39:05 +0200 Subject: [PATCH 2/3] Update simple example in readme to specify SMTP server and use TLS --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e13fe2d..481f46c 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,20 @@ The simplest method is to run the official image: ``` -docker run -e ROUNDCUBEMAIL_DEFAULT_HOST=mail -d roundcube/roundcubemail +docker run -e ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail -e ROUNDCUBEMAIL_SMTP_SERVER=tls://mail -d roundcube/roundcubemail ``` +where `mail` should be replaced by your host name for the IMAP and SMTP server. + ## Configuration/Environment Variables The following env variables can be set to configure your Roundcube Docker instance: -`ROUNDCUBEMAIL_DEFAULT_HOST` - Hostname of the IMAP server to connect to +`ROUNDCUBEMAIL_DEFAULT_HOST` - Hostname of the IMAP server to connect to, use `tls://` prefix for STARTTLS `ROUNDCUBEMAIL_DEFAULT_PORT` - IMAP port number; defaults to `143` -`ROUNDCUBEMAIL_SMTP_SERVER` - Hostname of the SMTP server to send mails +`ROUNDCUBEMAIL_SMTP_SERVER` - Hostname of the SMTP server to send mails, use `tls://` prefix for STARTTLS `ROUNDCUBEMAIL_SMTP_PORT` - SMTP port number; defaults to `587` From 1acb5c78bcb6992db88b04e1dda57569e17aa8bc Mon Sep 17 00:00:00 2001 From: Aaron Spettl Date: Wed, 8 Aug 2018 19:27:13 +0200 Subject: [PATCH 3/3] Do not use tls:// in example (review comment) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 481f46c..f4a0711 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The simplest method is to run the official image: ``` -docker run -e ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail -e ROUNDCUBEMAIL_SMTP_SERVER=tls://mail -d roundcube/roundcubemail +docker run -e ROUNDCUBEMAIL_DEFAULT_HOST=mail -e ROUNDCUBEMAIL_SMTP_SERVER=mail -d roundcube/roundcubemail ``` where `mail` should be replaced by your host name for the IMAP and SMTP server.