diff --git a/mail-toaster.sh b/mail-toaster.sh index 670b0e4e..aa49bc21 100755 --- a/mail-toaster.sh +++ b/mail-toaster.sh @@ -77,26 +77,21 @@ export JAIL_NET6="$(get_random_ip6net)" export ZFS_VOL="zroot" export ZFS_JAIL_MNT="/jails" export ZFS_DATA_MNT="/data" -export TOASTER_MARIADB="0" export TOASTER_MSA="haraka" export TOASTER_MYSQL="1" export TOASTER_MYSQL_PASS="" export TOASTER_NRPE="" export TOASTER_PKG_AUDIT="0" export TOASTER_PKG_BRANCH="latest" -export TOASTER_QMHANDLE="0" -export TOASTER_SENTRY="" export TOASTER_USE_TMPFS="0" export TOASTER_VPOPMAIL_CLEAR="1" export TOASTER_VPOPMAIL_EXT="0" export CLAMAV_FANGFRISCH="0" -export CLAMAV_UNOFFICIAL="0" export MAXMIND_LICENSE_KEY="" export ROUNDCUBE_SQL="0" export ROUNDCUBE_DEFAULT_HOST="" export ROUNDCUBE_PRODUCT_NAME="Roundcube Webmail" export ROUNDCUBE_ATTACHMENT_SIZE_MB="25" -export SQUIRREL_SQL="0" EO_MT_CONF @@ -480,21 +475,22 @@ get_safe_jail_path() add_jail_conf_d() { + _safe_path="/etc/jail.conf.d/$(safe_jailname $1).conf" if [ -f "/etc/jail.conf.d/$1.conf" ]; then - tell_status "preserving jail config /etc/jail.conf.d/$1.conf" + tell_status "preserving jail config $_safe_path" return fi - tell_status "creating /etc/jail.conf.d/$1.conf" + tell_status "creating $_safe_path" echo "$(jail_conf_header) -$1 {$(get_safe_jail_path $1) - mount.fstab = \"$ZFS_DATA_MNT/$1/etc/fstab\"; +$(safe_jailname $1) {$(get_safe_jail_path $1) + mount.fstab = \"\$path/etc/fstab\"; ip4.addr = $JAIL_NET_INTERFACE|${_jail_ip}; ip6.addr = $JAIL_NET_INTERFACE|$(get_jail_ip6 $1);${JAIL_CONF_EXTRA} - exec.created = \"$ZFS_DATA_MNT/$1/etc/pf.conf.d/pfrule.sh load\"; - exec.poststop = \"$ZFS_DATA_MNT/$1/etc/pf.conf.d/pfrule.sh unload\"; - }" | tee -a /etc/jail.conf.d/$1.conf + exec.created = \"\$path/etc/pf.conf.d/pfrule.sh load\"; + exec.poststop = \"\$path/etc/pf.conf.d/pfrule.sh unload\"; + }" | tee -a $_safe_path } add_automount() diff --git a/provision/dcc.sh b/provision/dcc.sh index b657440b..b53ed594 100755 --- a/provision/dcc.sh +++ b/provision/dcc.sh @@ -53,6 +53,18 @@ configure_dcc() -e '/^DCCM_REJECT_AT/ s/=.*/=MANY/' \ -e "/^DCCIFD_ARGS/ s/-SList-ID\"/-SList-ID -p*,1025,$JAIL_NET_PREFIX.0\/24\"/" \ "$STAGE_MNT/var/db/dcc/dcc_conf" + + _pf_etc="$ZFS_DATA_MNT/dcc/etc/pf.conf.d" + store_config "$_pf_etc/allow.conf" < port 6277 -> $(get_jail_ip dcc) +rdr inet6 proto tcp from any to port 6277 -> $(get_jail_ip6 dcc) +EO_PF_RDR + } start_dcc() diff --git a/provision/dns.sh b/provision/dns.sh index fd70f3eb..c6e34ce2 100755 --- a/provision/dns.sh +++ b/provision/dns.sh @@ -107,6 +107,10 @@ enable_control() return fi + tell_status "creating $ZFS_DATA_MNT/dns/control" + mkdir "$ZFS_DATA_MNT/dns/control" || exit + + tell_status "configuring unbound-control" tee "$ZFS_DATA_MNT/dns/control.conf" <