Check if port 143 is open
On the server, see what is listening:
sudo ss -tulpn | grep ':143 '
From another machine, test reachability:
nc -zv your-server.example.com 143
Block port 143 from the internet
With UFW (Ubuntu/Debian):
sudo ufw deny 143
With firewalld (RHEL/AlmaLinux/Rocky):
sudo firewall-cmd --permanent --remove-port=143/tcp && sudo firewall-cmd --reload