Lab 10: Printing&Messaging

This lab provides a practical introduction to the material presented in lectures on SMTP. It may be useful to consult the lecture notes to refresh your memory about some of the details

Look at some of your email using your normal email reader.
The procedure for doing this will vary between mail readers - basically you need to turn on display of all headers if they are not, by default displayed. Here are some suggestions:
Pegasus ( MtHelen campus )

Hotmail MS Outlook Netscape Messenger You should be able to identify those headers discussed in lectures as associated with RFC-822.
Which of those lines include information added by MTAs?
What MTAs have "stamped" your mail?
If you are at MtHelen and have an account on krause you can try the following:
1. telnet to krause. Have a look at the /etc/services file ( more /etc/services ) and locate services that you are familiar with. Note that this file provides a "mapping" between services and well-known port numbers. What well-known port is associated with SMTP?
2. Send some mail to yourself on krause using the default mailer (/usr/ucb/mail) in verbose mode: type "mail -v <mylogin>". Type in the subject line, followed by as much message as you want to send, terminating with a dot on a line by itself. Observe the output and note that the SMTP commands sent by krause are those beginning with ">>>". Note what SMTP commands are used to send mail
3. To read this mail ( which is waiting in your mailbox on krause ) use the mail command with no extra parameters - at the mail program prompt you can use "r" to read the mail. Use "q" to quit mail - take note of the location of your mailbox ( /var/mail/<login id> ).
4. Use more to inspect the contents of your mailbox on krause - you should see the message and all its headers. Take note of the headers that you see - this is the absolute minimum set of headers that SMTP has used for a purely local delivery.
5. Next send some mail to your normal campus mail account using the default mailer (/usr/ucb/mail) in verbose mode: type "mail -v mylogin@students.ballarat.edu.au".
6. Examine the mail from Pegasus when it arrives, comparing the headers with what you saw on the purely local message in step 5. Which lines of the header are typically added by the UA, and which by the MTA?

Directly communicating with a SMTP server

For this exercise you will be communicating with a SMTP server as if you were another SMTP server.

If you are working at home you will need to be running your own SMTP server on your home network on a separate machine to complete this exercise. Follow the instructions with the CD to start up the NPS servers and note the IP address of that machine

To talk to the SMTP server you will use the Windows telnet program - Start/Run/telnet
Select Connect/Remote System
Under Hostname enter (((SMTPServer)))
Under Port enter 25
Hit Connect
You should see a Welcome! message from the SMTP server
When you telnet to a SMTP server it does not usually echo back the characters - so you will have no idea what you are typing. To fix this turn on:

Terminal/Preferences/Local Echo

Send some mail to yourself using SMTP commands as shown: ( make sure that you type carefully because the backspace key will not properly delete stuff )

How do you suggest SMTP would be used to send email to multiple recipients? Test your answer.
In your normal mail reader inspect your mail - look particularly at the extra, non-standard, header that you added.
Set up appropriate filtering for NetXRay (what is appropriate filtering?).
Start a capture.
Telnet to the SMTP server again
.Which is the first party to initiate SMTP conversation (you or the server)?
What do you notice about the outgoing packets as you send the helo command to the server? (Note that this is a feature of telnet).
What is the nature of the response packets from the server?
To defeat the problem that this causes for a 5-buffer limit: Set filtering so that NetXRay only captures incoming packets. Then filter so that all packets that have the TCP ACK and PSH flags set will be included. This requires use of the Data Pattern panel in NetXRay. Ask your tutor about this if you are unsure of its use. You should be able to enter the required information simply by pointing at a past packet capture and clicking at the required pattern (that is, there is no calculation required).

NOTE: The PSH ("push") flag is used to signify that data should be passed quickly to the application. This is one way to distinguish this SMTP data (in this case) from TCP maintenance data (such as the verification of each letter typed).