POP3.md
 1  ## POP3 (Post Office Protocol Version 3)
 2  
 3  **Post Office Protocol Version 3 (POP3)** is a standard email protocol used for retrieving messages from a mail server. It allows users to download emails to their local devices, enabling offline access to their messages. POP3 is widely supported by various email clients and servers.
 4  
 5  ## Key Features
 6  
 7  - **Client-Server Model**: POP3 operates on a client-server architecture, where the email client (the user's application) connects to the email server to retrieve messages.
 8  - **One-Way Communication**: POP3 is primarily a one-way protocol, meaning it downloads emails from the server to the client and typically deletes them from the server after retrieval. This process allows users to access their emails offline.
 9  - **Ports**: POP3 uses two main ports:
10      
11      - **Port 110**: The default port for non-encrypted connections.
12      - **Port 995**: Used for secure connections with [[SSL]]/[[TLS]] encryption.
13      
14  
15  ## How POP3 Works
16  
17  1. **Connection Establishment**: The email client establishes a TCP connection with the POP3 server on the designated port (usually 110 or 995).
18  2. **Authentication**: The client sends the username and password to authenticate with the server.
19  3. **Message Retrieval**:
20      
21      - The client requests a list of available emails.
22      - The server responds with the email details (size, unique identifiers).
23      - The client downloads selected messages, which are then deleted from the server by default.
24      
25  4. **Session Termination**: Once the messages are downloaded, the client sends a command to close the session, and the connection is terminated.
26  
27  ## Advantages and Limitations
28  
29  ## Advantages
30  
31  - **Simplicity**: POP3 is straightforward and easy to implement, making it widely used across various email clients.
32  - **Offline Access**: Once emails are downloaded, users can access them without an internet connection.
33  
34  ## Limitations
35  
36  - **Single Device Access**: Emails downloaded via POP3 are typically stored on one device, making it challenging to access the same emails from multiple devices unless configured otherwise.
37  - **Lack of Synchronization**: POP3 does not synchronize changes made on the server (like marking messages as read) back to the server once messages are downloaded.
38  
39  ## Comparison with IMAP
40  
41  Unlike POP3, which downloads and often deletes messages from the server, **Internet Message Access Protocol (IMAP)** allows users to manage their emails directly on the server. IMAP supports multiple devices accessing the same mailbox and maintains synchronization across all devices.