Logo
My Journal
Blog

Timeline

Blog

Test if local SMTP server is running

To test if a local SMTP server is running, you can try to ping the port 25

$ echo -e “quit” | nc localhost 25
[php]220 ubuntu ESMTP Postfix (Ubuntu)
221 2.0.0 Bye
If no SMTP server is listening[/php]

$ echo -e “quit” | nc localhost 25
[php]localhost.localdomain [127.0.0.1] 25 (?) : Connection refused[/php]

Leave A Comment