CS161 Programming Assignment 5: IMAP Server (part 2)

1) Preliminaries

Questions: cs161tas@cs.brown.edu
Due date: Monday, December 12th, 5 PM.

2) CS161 Environment Setup

Add this line to your shell startup scripts:

    source /course/cs161/startups/cs161student

3) Introduction

Your sixth programming task is to finish your C++ IMAP server. As you know by now, IMAP is described in RFC 3501. To finish your server, you'll be implementing the following commands: SELECT, EXAMINE, CREATE, DELETE, RENAME, LIST, STATUS, APPEND, CLOSE, EXPUNGE, FETCH, and STORE. See the specifications to see how you may simplify the implementation of many of these commands.

As usual, you will implement your server with an event-based architecture to support large numbers of concurrent connections. Again, you may use external processes to avoid blocking in your main loop, but you should avoid starting a process for each connection.

4) Assignment Specification

  1. Your program should meet the specifications from Part 1.
  2. In general, you should follow the IMAP RFC, however, in an attempt to reduce the amount of grungy parsing (of commands and mail messages), the following commands may be simplified as described:
  3. Include at least one example of using your IMAP client to exercise your server.
  4. You should describe your program in a README. Describe your server, including design choices (handling mailboxes, folders, flags, etc) and limitations in your implementation. In addition, describe how you would implement the UID command.

5) Testing

You should be able to use your IMAP client from previous labs to test your server. Testing with other clients (pine, mozilla, fetchmail, etc) may also be useful.

Remember to read RFC 2683 which contains advice for IMAP developers (clients and servers).

6) Support Code

We providing some code that may be useful for parsing imap command lines. Look in /course/cs161/asgn/imapd/token.

7) Submitting your code

To submit your code, first make sure your source files reside in a "imapd-final" directory. Run the following script from the parent directory of "imapd-final" to hand in:
    /course/cs161/bin/cs161_handin imapd-final
Please contact the TAs if you have problems submitting. For your own sanity, don't leave your submission until the minute before the deadline.

8) Grading scheme

Your code will be graded on the following factors (and their weights).

Documentation and design: 30%
Functionality (non-blocking, error reporting, etc): 50%
Robustness (malicious input, many connections, etc): 20%