Source: command line – How to check if smtp is working from commandline (Linux) – Stack Overflow