!!! Do you know that Sun decided to defer Solaris on Intel ? For more information : go Save Solaris x86

Check if your smtp server works

This part represents only a quick practise for testing mail servers. For full information of SMTP commands see RFC821.

We can do this manually by using a telnet connection to port 25 of the server. Run the following command to make that connection telnet your-mail-server 25, if you see the greeting message it means the mailserver is running.

In the following output, the blue lines are the commands we type in. The dot lines are notes.

[vu@java vu]$ telnet 192.168.253.2 25
Trying 192.168.253.2...
Connected to 192.168.253.2.
Escape character is '^]'.
220 pluto.my-domain.com ESMTP Sendmail 8.11.0/8.11.0; Sun, 30 Dec 2001 15:10:56 -0600

And then try to send an email

helo ironwill.my-domain.com
250 pluto.my-domain.com Hello ironwill.my-domain.com [192.168.253.1], pleased to meet you
mail from:dt164@my-domain.com
250 2.1.0 vu@sivell.com... Sender ok
rcpt to:dt1649651@yahoo.com
250 2.1.5 dt1649651@yahoo.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
this is a test
.     A line  with only dot means end of the data part: <Enter><dot><Enter>
250 2.0.0 fBULGvX01436 Message accepted for delivery
quit
221 2.0.0 pluto.my-domain.com closing connection
Connection closed by foreign host.

A short explanation for each command. Each command is ended with <Enter> ( CRLF )
HELO In order to send emails, this command must be the first command after the connection is made. It requires one parameter to be the client hostname. In the above example, the client host is ironwill.my-domain.com.

EHLO Similar to HELO, but for extended commands.
MAIL FROM: This 2nd command informs the mail server the sender email address. Be sure that there is colon right after the keyword FROM.

RCPT TO: This 3rd command informs the mail server the receiver address. Depending on the mail server configuration this command may have different reply from the server. For example, it may refuse a sender because of mail relaying. Also note that there is colon right after the keyword TO.

DATA This command informs the mail server that the next line will start the mail body.

. A dot only ( of course, following by Enter ) informs mail server the end of the DATA command.

QUIT This command informs the mail server to close the connection.