Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Test if local SMTP server is running

Answer:

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

# echo -e "quit" | nc localhost 25
220 ubuntu ESMTP Postfix (Ubuntu)
221 2.0.0 Bye

If no SMTP server is listening

# echo -e "quit" | nc localhost 25
localhost.localdomain [127.0.0.1] 25 (?) : Connection refused
  1. Quick and easy SMTP server with Python
  2. Emulate telnet using nc
  3. Can’t connect to local MySQL server through socket
  4. Updating a local branch from the remote server using git
  5. Running a command on the remote server

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>