We have service staus script on a Plesk server and it checks http, bind, pop, smtp etc and it works great. It checks Plesk and Cpanel servers flawlessly. But when I put the same script on a Cpanel server, it can't connect to port 25 on any Cpanel box. That's pretty strange.
What is even more strange is if I set the Cpanel boxes to run exim on port 26 as well and set the script to check port 26, it can connect.
So externally (as in from Plesk), the script can check Cpanel server's port 25 but Cpanel can't check its own port 25 or port 25 on any otherCpanel server. Most bizarre! Here's the code that I've always used: