'Talking' SMTP

You are (very likely) already familiar with the Email service, this is why the email service, as used in daily live, is not exercised. Instead the focus is on 'talking' one of the Email protocols, in particular SMTP.

In this training-exercise, you are going to send an Email message to yourself by directly accessing/using the SMTP protocol.

The experiment configuration

The experiment configuration is shown in Figure 1. In the experiment 'Your PC' is both the source and destination host (sse also: The E-mail service). Instead of using POP3 (or IMAP) and a user agent for the communication between the source host and the Email server, you are going to emulate (i.e. mimic) a SMTP protocol entity and talk SMTP with a Email server at the University of Twente (shannon.cs.utwente.nl). This can be achieved by you setting up a Telnet session. The idea now is as follows:

  1. Using Telnet, you are going to talk SMTP protocol with the SMTP protocol entity at the machine named shannon.cs.utwente.nl with the purpose to submit an E-mail message to that machine.
  2. This E-mail message is constructed in such a way, that the MTA runnning on shannon.cs.utwente.nl forwards this E-mail message to the E-mail server to which you have access.
  3. With for instance the POP3 protocol you can retrieve the E-mail message that you have just submitted.

Figure 1: The configuration for talking SMTP

Start the Telnet Application

For this exercise you need the Telnet application, this application should be part of the standard PC setup. Telnet can be found under:

Start -> Programs -> Assoccories -> Telnet

Now a Telnet window pops-up.

Telnet Settings...

Later on you will talk SMTP using Telnet, in order to see what you type you should do the following:

  1. In the Telnet menu bar select: Terminal -> Preferences...
  2. In the window that pops-up you should set Local Echo on.

Establish a connection

To make a connection select:

Connect -> Remote System...

A new Window (named 'connect') pops-up. Set the following three fields:

After you have pressed the connect button you can start talking SMTP. Follow the instructions given on Figure 2, the following conventions are used in this figure:

Figure 2: Sending an Email message by talking SMTP.

The Result

As a result of the above you'll receive an Email message from "You'll-never-know-for-sure" in you inbox. The message should look similar to what is shown in Figure 3.

Figure 3: The result of the experiment in your inbox.

Questions

Address the following:

  1. What SMTP PDUs did you type?
  2. What SMTP Protocol Control Information (PCI) did you type?

The E-mail server replies are giving by 'codes' (such as 220, 221 and 354). What is the reply code for 'Transaction failed'?
Hint: consult RFC 821!

How can you check the validity of the sender's E-mail address?