Due: Tuesday, March 16, 2021, 11:59 pm

Tasks

Problem Set:

  1. Use the dig and whois commands to find out the following infomation of Colby. Show how do you use those commands to get the information.
    1. Domain name
    2. Name servers
    3. Address range
    4. Prefix
  2. Send yourself a brief email that includes an attachment. Do some research on your mail client, and find a way to make your mail client show the raw message source. Describe each line in the message header and outline how the attachment was included in the message.
  3. Analyze this trace that contains a capture mail delivery from a laptop. Answer the following quesitons.
    1. What is the port number that the mail client connects to on the server?
    2. Can you see the content of the message in the trace? If yes, where? If not, why not?
    3. The actual message sent is few hundred bytes long, including headers. What is the total number of bytes transmitted by the client? What are the causes of the discrepancy between the message length and the total number of bytes sent?
    4. What mailserver software is running in the server? What version? Is it current?
    5. Can you tell the timezone in which the server is running?
  4. Use the command-line networking utility nc to finish the following tasks:
    1. Connect to a web server and capture its response to a well-formed GET request that you send to it. Get a screenshot of your terminal. Briefly describe each line in the HTTP response. No need to analyze the documents itself.
    2. Pretend to be a server on your local machine and capture an HTTP request made by a browser. Get a screenshot of your terminal. Briefly describe each line in the request.

    You are expected to look up the meaning of the lines that were not discussed in the class.

Programming assignment:

We studied SMTP in class. If you want to review or learn more about it, you can use the lecture notes posted on the course website under the "Notes" section. You can also read the textbook, which has a good description, or can look at RFC 5321 or Wikpedia article, which has a good example of a typical SMTP exchange. The goal of this part of the project is try to directly communicate with an MTA pretending to be another MTA sending a message.

  1. SSH to gloin.cs.colby.edu, connect to the mail server running at it on port 25 using nc (or a telnet client) and pretend to be an MTA delivering two messages addressed from cs331 AT gloin.cs.colby.edu to your Colby email address and your local address at gloin (xxx AT gloin.cs.colby.edu) separately. Use subject "SMTP test" and make sure that you are identified in the body of the message.

    Did you send email to your Colby address successfully? Did you send email to your local address at gloin successfully (use the utility mail to check)? Capture the session and turn it in as a part of the assignment write-up. Explain why did you send email successfully or unsuccessfully in your write-up?

    Using gloin.cs.colby.edu as the mail server, send an email with a fake "From" address to yourself at gloin. Did you succeed this time? Capture the session and turn it in as a part of the assignment write-up. This experiment can help you to figure out the reason behind the success/failure in the above paragraph.

    Technically, you can use any mail server for the assignment, however, I would like to ask you to use the one specified above. While there is nothing technically wrong with connecting to any mail server, typos-filled hand-typed sessions tend to trigger various security alarms.

  2. Write as-short-as-possible program that delivers an email message by (partially) implementing SMTP conversation. You are not expected to use any library for sending email (e.g., javax.mail or python smtplib). Take a look at the quick intro to Python network programming in the textbook - that might be the quickest way to get this part done.

Extensions

  1. Implement the SMTP conversation via a different language without using any library.
  2. Use the mail library of a language to implement the SMTP conversation.
  3. Do some interesting experiments with the network tools. Explain the purposes of your experiments, the experiment setup, and your findings.
  4. Reimplement part b of the programming assignment. Try not to use any command or utility for direct sending of the email (e.g., the mail command in Unix/Linux). Basic shell, nc, and expect are probably good starting points in your search for the right tools. FYI, expect is a scripting language for interactive programs. Here is a well-written poster for you to get started. Gloin has expect installed. Have fun!

Submission

Please follow the submission instructions to turn in your work.

© 2021 Ying Li. Page last modified: .