From 429a3c2cefc512414fbc8deec18e7978544ff1ea Mon Sep 17 00:00:00 2001 From: yodax Date: Mon, 10 Jul 2017 22:56:59 +0200 Subject: [PATCH] Revert updating mail_host with PRIMARY_HOSTNAME instead don't verify the peer_name when connecting from roundcube --- setup/webmail.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/setup/webmail.sh b/setup/webmail.sh index cdfc9a73..c1eea929 100755 --- a/setup/webmail.sh +++ b/setup/webmail.sh @@ -112,13 +112,25 @@ cat > $RCM_CONFIG < array( + 'verify_peer' => false, + 'verify_peer_name' => false, + ), + ); \$config['imap_timeout'] = 15; -\$config['smtp_server'] = 'tls://${PRIMARY_HOSTNAME}'; +\$config['smtp_server'] = 'tls://127.0.0.1'; \$config['smtp_port'] = 587; \$config['smtp_user'] = '%u'; \$config['smtp_pass'] = '%p'; +\$config['smtp_conn_options'] = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + ), + ); \$config['support_url'] = 'https://mailinabox.email/'; \$config['product_name'] = '$PRIMARY_HOSTNAME Webmail'; \$config['des_key'] = '$SECRET_KEY'; @@ -211,9 +223,6 @@ ${RCM_DIR}/bin/updatedb.sh --dir ${RCM_DIR}/SQL --package roundcube chown www-data:www-data $STORAGE_ROOT/mail/roundcube/roundcube.sqlite chmod 664 $STORAGE_ROOT/mail/roundcube/roundcube.sqlite -# Make sure all the users are configured to use the correct hostname -sqlite3 $STORAGE_ROOT/mail/roundcube/roundcube.sqlite "update users set mail_host = '$PRIMARY_HOSTNAME'" - # Enable PHP modules. phpenmod -v php7.0 mcrypt imap restart_service php7.0-fpm