Question: The big picture here is that you will write two simple programs: One that acts like a basic POP3 server and one that acts like

The big picture here is that you will write two simple programs: One that acts like a basic POP3 server and one that acts like a simple POP3 client. Your programs do not have to implement the full POP3 spec, but all of the behavior is inspired by it. 1 The Setup You will write two programs. The server should run forever, listening for TCP requests. When the request arrives, a conversation between the POP server and the POP client will occur (please check out the example in the course slides). See Section 2 for a complete list of commands the server must support. After the QUIT command, the TCP connection should be closed and the server returns to listening for new connections. The client will be an interactive program, rather than the behind the scenes behavior of a real email client. The user should be prompted to type any of the commands listed in Section 2. For simplicity, let all of the emails exist as separate plaintext files (This eliminates the nastiness of file pointers or figuring out some way to build a custom message store). Posted with this assignment are three plaintext (RFC 5322) emails. Upon starting up, the server should detect that these files exist and respond to the clients queries based on this information. For example, if the client issues the LIST command, the server should report those three emails and their respective sizes. A DELE command should have the effect of truly deleting that message from the store (i.e., deleting the file). If I fire up the client again, deleted messages should not be available for download again. The client is only truly responsible for getting the email and saving it locally. You do not need to display them (unless you would like some extra points see Section 6). After a session communicating with the server, the client should exit. 2 Some Details Your server should be listening on a port number that is passed as a command-line argu- ment (e.g., ./server 5000). If you want, you can use a default value if nothing is passed

on the command line. If you are developing on library machines, there is a possibility that two servers may try to use the same port. To reduce this possibility, use the last four digits of your M-number (provided they are greater than 1024). This has historically worked pretty well. The client should be passed the IP address and port of the server as command line arguments (e.g., ./client localhost 5000). The program should accept localhost or a numeric IP address. The server should support the following POP3 commands (check out the meaning of each command in the course slides): STAT LIST RETR DELE TOP QUIT See the course slides or a POP3 reference for descriptions of each of these commands. 3 Deliverables You will be submitting the source code for the two programs. They may be written in C or Python 3. If you choose to use Python 3 and somehow feel the need for some fancy package, explicitly indicate in your submission how to install that. No notebooks (e.g., Jupyter) are permitted. If you choose to develop in C, you should provide a makefile (or at least a shell which can be used to easily compile your program). Be sure to submit the test email files along with your source code. The grader will deduct 5 points from your final score if he/she has to copy those files to test your code. If any special instructions are needed for compilation or running, please include those as a simple README file.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!