CS161 Programming Assignment 5: IMAP Server (part 2)
Due date: Monday, December 12th, 5 PM.
2) CS161 Environment Setup
Add this line to your shell startup scripts:
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
- Your program should meet the specifications from Part 1.
- 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
Include at least one example of using your IMAP client to
exercise your server.
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.
- APPEND - You need not handle the optional date/time
- FETCH - You need not handle partial fetches. You only need
to handle two data items FLAGS and BODY.
- UID - You are not implementing UID, but you are expected to
describe how you would proceed (as if there was a part 3).
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
6) Support Code We providing some code that may be useful
for parsing imap command lines. Look in
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
Please contact the TAs if you have problems submitting. For your own
sanity, don't leave your submission until the minute before the
8) Grading scheme
Your code will be graded on the following factors (and their
|Documentation and design:
|Functionality (non-blocking, error reporting, etc):
|Robustness (malicious input, many connections, etc):