How to open custom SMTP port in Exim4 on myVesta

Post Reply
User avatar
isscbta
Team Member
Posts: 137
Joined: Mon Jul 19, 2021 1:41 am
Has thanked: 17 times
Been thanked: 3 times

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

Tags:
Post Reply