mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-11 01:27:17 +00:00
Merge f7a0378fd1
into d7244ed920
This commit is contained in:
commit
46eb2fe983
@ -54,6 +54,10 @@ cat > /etc/logrotate.d/nsd <<EOF;
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
if [[ -n "$LX_ZONE" ]]; then
|
||||||
|
sed -i -e "s/ip-transparent: yes/ip-transparent: no/" /etc/nsd/nsd.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# Since we have bind9 listening on localhost for locally-generated
|
# Since we have bind9 listening on localhost for locally-generated
|
||||||
# DNS queries that require a recursive nameserver, and the system
|
# DNS queries that require a recursive nameserver, and the system
|
||||||
# might have other network interfaces for e.g. tunnelling, we have
|
# might have other network interfaces for e.g. tunnelling, we have
|
||||||
|
@ -64,3 +64,13 @@ if [ "$ARCHITECTURE" != "x86_64" ] && [ "$ARCHITECTURE" != "i686" ]; then
|
|||||||
echo "You are on your own."
|
echo "You are on your own."
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check if we're running in a SmartOS LX zone and disable firewall and
|
||||||
|
# accordingly.
|
||||||
|
KERNEL_VERSION=$(uname -v)
|
||||||
|
if [[ "$KERNEL_VERSION" =~ "BrandZ virtual linux" ]]; then
|
||||||
|
echo "WARNING: Mail-in-a-Box will disable firewall setttings please make sure to handle this yourself."
|
||||||
|
DISABLE_FIREWALL=1
|
||||||
|
LX_ZONE=1
|
||||||
|
fi
|
||||||
|
@ -369,6 +369,12 @@ cat conf/fail2ban/jails.conf \
|
|||||||
> /etc/fail2ban/jail.d/mailinabox.conf
|
> /etc/fail2ban/jail.d/mailinabox.conf
|
||||||
cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/
|
cp -f conf/fail2ban/filter.d/* /etc/fail2ban/filter.d/
|
||||||
|
|
||||||
|
if [[ -n "$LX_ZONE" ]]; then
|
||||||
|
sed -i -e "s/iptables-allports/ipfilter/g" /etc/fail2ban/jail.conf
|
||||||
|
sed -i -e "s/iptables-allports/ipfilter/g" /etc/fail2ban/jail.d/mailinabox.conf
|
||||||
|
sed -i -e "s@/sbin/ipf@/native/usr/sbin/ipf@g" /etc/fail2ban/action.d/ipfilter.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# On first installation, the log files that the jails look at don't all exist.
|
# On first installation, the log files that the jails look at don't all exist.
|
||||||
# e.g., The roundcube error log isn't normally created until someone logs into
|
# e.g., The roundcube error log isn't normally created until someone logs into
|
||||||
# Roundcube for the first time. This causes fail2ban to fail to start. Later
|
# Roundcube for the first time. This causes fail2ban to fail to start. Later
|
||||||
|
11
setup/web.sh
11
setup/web.sh
@ -103,12 +103,15 @@ fi
|
|||||||
# nginx configuration at /mailinabox-mobileconfig.
|
# nginx configuration at /mailinabox-mobileconfig.
|
||||||
mkdir -p /var/lib/mailinabox
|
mkdir -p /var/lib/mailinabox
|
||||||
chmod a+rx /var/lib/mailinabox
|
chmod a+rx /var/lib/mailinabox
|
||||||
|
if [[ -n "$LX_ZONE" ]]; then
|
||||||
|
apt_install uuid
|
||||||
|
fi
|
||||||
cat conf/ios-profile.xml \
|
cat conf/ios-profile.xml \
|
||||||
| sed "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" \
|
| sed "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" \
|
||||||
| sed "s/UUID1/$(cat /proc/sys/kernel/random/uuid)/" \
|
| sed "s/UUID1/$(cat /proc/sys/kernel/random/uuid || uuid)/" \
|
||||||
| sed "s/UUID2/$(cat /proc/sys/kernel/random/uuid)/" \
|
| sed "s/UUID2/$(cat /proc/sys/kernel/random/uuid || uuid)/" \
|
||||||
| sed "s/UUID3/$(cat /proc/sys/kernel/random/uuid)/" \
|
| sed "s/UUID3/$(cat /proc/sys/kernel/random/uuid || uuid)/" \
|
||||||
| sed "s/UUID4/$(cat /proc/sys/kernel/random/uuid)/" \
|
| sed "s/UUID4/$(cat /proc/sys/kernel/random/uuid || uuid)/" \
|
||||||
> /var/lib/mailinabox/mobileconfig.xml
|
> /var/lib/mailinabox/mobileconfig.xml
|
||||||
chmod a+r /var/lib/mailinabox/mobileconfig.xml
|
chmod a+r /var/lib/mailinabox/mobileconfig.xml
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user