From 333667db8cab23e5911d583b41251ad8b30d89a6 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Wed, 15 Apr 2020 17:18:28 -0400 Subject: [PATCH] Updates for 2.2.19 --- Dockerfile | 2 +- files/patches | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1f42933..b8b6281 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG UPSTREAM=2.2.2 +ARG UPSTREAM=2.2.19 FROM analogic/poste.io:$UPSTREAM RUN apt-get update && apt-get install less # 'less' is Useful for debugging diff --git a/files/patches b/files/patches index 374477d..24a849f 100755 --- a/files/patches +++ b/files/patches @@ -29,6 +29,14 @@ __sedline() { sed+="${*/#/\\$'\n'}"; } shopt -q expand_aliases||{ unalias -a;shopt -s expand_aliases;};builtin alias +='{ ::__;::(){ ((!$#))||{ shift;"${__dsl__[@]-::no-dsl}" ' ~='{ ::__;::(){ ((!$#))||{ shift; ' -='"${__dsl__[@]-::no-dsl}" ' '{{=return;return;};__blk__=;set -- "${__blarg__[@]:1}"; ' '}}=};__:: 0 "$@";}';::block(){ ((!$#))||local __dsl__=("$@");${__blk__:+::};};__bsp__=0;::__(){ __bstk__[__bsp__++]="${__blk__:+__blk__=1;$(declare -f ::)}";};__::(){ local __blarg__=("$@");__blk__=1;:: "$@"||set -- $?;__blk__=;local REPLY;${__bstk__[--__bsp__]:+eval "${__bstk__[__bsp__]}"}||:;return $1;} +# === UI bug fix for 2.2.19 === + +~ edit /opt/admin/app/Resources/views/base.html.twig; {{ + # Fix missing hostnames on IP stats + - sub "on('load'," "on('load change'," +}} + + # === Restrict public ports to the container hostname IP === ~ edit /opt/www/webmail/config/config.inc.php; {{ @@ -122,32 +130,18 @@ haraka_sub_web=$sockdir/haraka/web-11381.sock # Haraka web servers need to listen on unix sockets -~ edit /usr/lib/node_modules/Haraka/server.js; {{ - - sub 'Server.get_listen_addrs(Server.http.cfg, 80)' \ - '[Server.http.cfg.listen]' - + range '^Server.setup_http_listeners' '^}$'; {{ - - sub 'const hp = .*' \ - 'const hp = [null, null, host_port];' - - sub 'Server.http.server.listen.*$' \ - '!fs.existsSync(host_port)||fs.unlinkSync(host_port); Server.http.server.listen(host_port, function(){fs.chmodSync(host_port, 0o777);});' - }} -}} - ~ edit /opt/haraka-smtp/config/http.ini; {{ - - sub 'listen=127.0.0.1:11380' "listen=$haraka_smtp_web" + - sub 'listen=127.0.0.1:11380' "listen=$haraka_smtp_web:777" }} ~ edit /opt/haraka-submission/config/http.ini; {{ - - sub 'listen=127.0.0.1:11381' "listen=$haraka_sub_web" + - sub 'listen=127.0.0.1:11381' "listen=$haraka_sub_web:777" }} - # Have haraka talk to rspamd via unix socket -~ edit /usr/lib/node_modules/Haraka/node_modules/haraka-plugin-rspamd/index.js; {{ - - del 'port: plugin' - - sub 'host: plugin.*,' \ - "socketPath: '$rspam'," +~ edit /opt/haraka-{smtp,submission}/config/rspamd.ini; {{ + - sub '^host.*=.*$' "unix_socket = $rspam" }} # Configure redis to listen on a unix socket, and rspamd+admin to connect there