Code: Select all
PORT='12384'
Code: Select all
check_grep=$(grep -c "$PORT" /etc/exim4/exim4.conf.template)
if [ "$check_grep" -eq 0 ]; then
sed -i "s|daemon_smtp_ports = 25 : 465 : 587 : 2525|daemon_smtp_ports = 25 : 465 : 587 : 2525 : $PORT|g" /etc/exim4/exim4.conf.template
v-change-firewall-rule '6' 'ACCEPT' '0.0.0.0/0' "25,465,587,2525,$PORT" 'TCP' 'SMTP'
systemctl restart exim4
fi