Collaboration Policy: CP-9 (Work together as a group, hand in a group submission) Names: _____________________ ______________________ _______________________ SI455 – Advanced Computer Networking Lab6: Programming an Email client (v1.0) Due 22 Apr by start of class Goals: By the end of this lab, each student should be able to 1. Use online references to learn about Layer-7 protocols 2. Use netcat to test and debug Layer-7 communications 3. Develop a client application that uses an existing Layer-7 protocol to contact a server Requirements: We will be developing an email client that must be able to send and receive email. The program must do the following at a minimum: o Accept an IP address of the email server from the user (IP cannot be hard-wired) o Accept a username and password from the user (they cannot not be hard-wired) o Send the username and password to the email server to verify the user’s credentials o Allow the user to send email (using SMTP) to any user on the email server o Allow the user to retrieve the list of folder names from IMAP server o Allow the user to retrieve the total number of messages in Inbox o Allow the user to retrieve the list of email subjects in Inbox o Allow the user to retrieve the full contents of any one email o Allow the user to delete a specific email from the Inbox o Allow the user to delete multiple emails (e.g. delete #s 1-10 or ALL) from the Inbox o Allow the user to exit the email client Extra credit is available for the following: o Differentiating between Read messages and Unread messages o Allow the user to create and delete folders, and move email between folders o Enabling attachments o Features like Spam filters, search mechanisms, or filtering based on date o Auto-reply daemon o Anything cool o Class favorite – 10 points if there is a clear favorite On the due date, groups will demonstrate their clients by sending email to each other, printing out the list of messages in the Inbox, reading messages, deleting messages, etc. 1 Collaboration Policy: CP-9 (Work together as a group, hand in a group submission) Names: _____________________ ______________________ _______________________ Scoring: Achieving every item in the Requirements list Each missed item: Style and ease of use: Total: + Extra Credit 90 -5 10 100 Teams: You may work in groups of 1-3. Each team submits a single copy of their project. Location: This software must run on your personal VMs. It will need to interact with servers on the class’s 14.0.0.0 network. Language: You may use any language you choose. We can set up a new VM or upload install files for languages that are not currently installed. Interaction with email server: You need to program the Layer-7 interaction with the SMTP and IMAP servers yourself. This means reading and writing the text of those protocols, just like we have been doing with netcat. No points will be awarded for any project that uses builtin email libraries or tools. Interface: You are welcome to program either a command-line application or a GUI. Command-line will probably require much less time. Some thought should be given to simplifying the interface for the user. The user should be able to interact with single keystrokes, e.g. pressing ‘i’ to see the messages in the Inbox. Email server: IP: 14.29.4.50 Server name: prism.net SMTP port: 25 IMAP port: 143 Username: first 4 letters of you lastname Password: same as username 2 Collaboration Policy: CP-9 (Work together as a group, hand in a group submission) Names: _____________________ ______________________ _______________________ Step 1: Be able to perform the required functionality in netcat Do the following for each task that requires interaction with the server. 1. Netcat to the server on the appropriate port 2. Use netcat interactively to verify that you can send the protocol correctly 3. Store the protocol’s commands in an appropriately-named text file (e.g. sendmail.txt) 4. Transmit the file over netcat to test: (e.g. nc 14.29.4.50 25 < sendmail.txt) You will need to create separate files for each of the following tasks. Hand these six files as part of your grade: o Send mail o Count messages in Inbox o List email subjects in Inbox o Retrieve a specific email message from Inbox o Delete specific email message from Inbox o Delete multiple email messages from Inbox Step 2: Pick a language Step 3: Design user-interaction The actual functionality can be extremely simple. Program can run off the command-line. Provide a simple menu to let people browse their email with a few keystrokes. You can check out the Linux ‘pine’ application as a good example of a command-line email client. Your program must demonstrate all of the Requirements shown on page 1. It should let a user browse their email with relative ease. Here is an example list of commands that you might want to use: i Display Inbox (Shows the subjects and the unread/total numbers of messages) r# Read message by number d # Delete a message by number d #-# Deletes a range of messages by number c Compose a message q Quit the program Step 4: Write program Step 5: Demo live in class Step 6: Submit your code scp your source code, executable, and text files from Step 1. Details to follow. 3