A Mail Server is a program that controls the sending and receiving of E-mails through the internet. Here I am emulating an SMTP and POP3 mail server. It will accept messages from a mail client store them internally and allow a client to retrieve the messages later. A separate Mail Box for each client is created. The clients can also telnet to the SMTP/POP3 ports and can send/receive messages by issuing the right commands.