Test mail with telnet or netcat

Test your mail server with telnet



#netcat localhost 25


The mail server will prompt like following in the terminal so that you can use to type SMTP commands.

Trying 127.0.0.1...
Connected to mail.fossedu.org.
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix (Ubuntu)

Type the following code segment:


ehlo localhost
mail from: root@localhost
rcpt to: me@localhost
data
Subject: My first mail test

Hi,
Are you there?
regards,
Admin
. (Type the .[dot] in a new Line and press Enter )
quit