Page 1 of 1

How to open custom SMTP port in Exim4 on myVesta

Posted: Thu Apr 13, 2023 5:05 pm
by isscbta
In your SSH, as root, run:

Code: Select all

PORT='12384'
Then paste this and press enter:

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