This guide helps you use the interactive script exim4-menu.sh to manage Exim4 (check status, ports, and change port).
It also includes manual commands in case you prefer not to use the script.
Run this one-liner to download, set permissions, and start the menu:
wget -O /root/exim4-menu.sh https://kutt.it/syvFX2 \
&& chmod +x /root/exim4-menu.sh \
&& /root/exim4-menu.shThe menu lets you:
- Check Exim4 service status (running or stopped)
- View listening ports (shows which SMTP ports Exim4 is bound to)
- Change Exim4 listening port (e.g., from
25to2525) - Restart Exim4 service
- Exit
If you donβt want to use the script, here are equivalent commands you can run directly.
systemctl status exim4ss -tulpn | grep exim4Edit or create the config macro file:
nano /etc/exim4/exim4.conf.localmacrosAdd or modify this line (example: port 2525):
MAIN_LOCAL_INTERFACES = 0.0.0.0.2525
Then update config and restart:
update-exim4.conf
systemctl restart exim4nc -zv localhost 2525-
Default SMTP port is 25.
-
Common alternatives: 587 (submission), 465 (SMTPS).
-
If Exim4 wonβt restart, check logs:
journalctl -xeu exim4.service
β You now have both an interactive menu and manual commands to manage Exim4.