Post Office Protocol (POP) and IMAP

... or how do I manage email on a mail server

There are three versions of the Post Office Protocol ...

POP1 : https://tools.ietf.org/html/rfc918
POP2 : https://tools.ietf.org/html/rfc937
POP3 : https://tools.ietf.org/html/rfc1081?

Essentially, the main difference of the two protocols is that POP downloads emails from the server for permanent local storage, while IMAP leaves them on the server and just caches (temporarily stores) emails locally. In other words, IMAP implements cloud storage for emails.