1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00
Mailu/services/rmilter/start.sh
2017-11-01 12:11:04 +01:00

17 lines
381 B
Bash
Executable File

#!/bin/bash
export WHITELIST=$(echo "$RELAYNETS" | sed 's/ /,/g')
# Substitute configuration
for VARIABLE in `env | cut -f1 -d=`; do
sed -i "s={{ $VARIABLE }}=${!VARIABLE}=g" /etc/rmilter.conf
done
rm -f /var/run/rsyslogd.pid
if [ "$ANTIVIRUS" == "clamav" ];
then
echo ".try_include /etc/rmilter-clamav.conf" >> /etc/rmilter.conf
fi
rmilter -c /etc/rmilter.conf
rsyslogd -n