POP3 - Post Office Protocol version 3 ======================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is POP3?** POP3 stands for Post Office Protocol version 3. It is a standard email protocol used to retrieve emails from a mail server to a local computer. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is POP3 useful?** POP3 downloads emails to our device, so we can read them even without an internet connection. It also helps free up space on the email server by deleting emails from the server after downloading (optional). POP3 is easy to configure and works with most email clients like Outlook, Thunderbird, etc. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * Email arrives at our mail server. * Our email client connects to the server using POP3. * It authenticates using our username and password. * The client downloads the emails from the server to our local device. * Depending on settings, it may delete the emails from the server. * We can now read emails offline on our device. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is POP3 used?** * In personal email clients like Microsoft Outlook, Mozilla Thunderbird, etc. * When users prefer to store emails locally instead of keeping them online. * In low-bandwidth environments where constant internet access isn’t available. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does POP3 belong to?** * It provides name resolution services to applications and users. * POP3 is used by email client software to retrieve emails from the server. * It deals with data formatting, user authentication, and communication with the mail server, which are functions of the Application Layer (Layer 7). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are the key features?** * Download-and-Delete Model. * One Inbox Only. * Single-Device Oriented. * Pull-Based Communication. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Can POP3 be used with multiple devices?** Not efficiently. POP3 is designed for single-device use. Using it with multiple devices may cause: * Email duplication. * Inconsistent inboxes. * Missing messages. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What happens if the internet disconnects during retrieval?** * Partial downloads may be lost. * Email might be redownloaded on the next connection. * If DELE hasn’t been processed, the email stays on the server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How is retransmission handled in POP3?** If an ACK is not received within the timeout interval, POP3 retransmits the segment. Modern POP3 uses: * Timeout-based retransmission. * Fast retransmit (based on duplicate ACKs). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are some applications that use POP3?** * Email Clients (Desktop-Based). * Mobile Email Apps (With Manual Setup). * Automated Systems / Scripts. * Web-Based Services. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is the working flow of POP3?** Email Client Connects to the Mail Server * The user opens an email app. * The client connects to the mail server on: * Port 110 (plain POP3). * Port 995 (POP3 over SSL/TLS). Client Authenticates * The client sends: * USER - username * PASS - password * If correct, the server allows access. Client Checks for Messages * The client asks how many messages are available: * STAT - gives number and total size. * LIST - lists each email with its size. Client Downloads Emails * The client uses RETR to download each email. * Emails are saved locally on the device (inbox folder or storage). Client Ends the Session * The client sends: * QUIT - ends session and deletes emails marked by DELE. * Connection is closed. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **When is POP3 preferred over IMAP?** * Low-storage servers. * Offline access needed. * Single-device users. * Simple use cases (e.g., automated systems downloading logs). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`POP3 Version&RFC Details ` * :ref:`POP3 Basic Setup on Ubuntu using IPv4 ` * :ref:`POP3 Basic Setup on Ubuntu using IPv6 ` * :ref:`POP3 Protocol Packet Details ` * :ref:`POP3 Usecases ` * :ref:`POP3 Basic Features ` * :ref:`POP3 Feature : Simple Protocol ` * :ref:`POP3 Feature : Email Download ` * :ref:`POP3 Feature : Offline Access ` * :ref:`POP3 Feature : Server Cleanup ` * :ref:`POP3 Feature : Limited Command ` * :ref:`POP3 Feature : Authentication Support ` * :ref:`POP3 Feature : Port Based Authentication ` * :ref:`POP3 Feature : No Folder Support ` * :ref:`POP3 Feature : Optional TLS Encryption ` * :ref:`Reference links ` .. _POP3_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _POP3_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _POP3_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _POP3_step5: .. tab-set:: .. tab-item:: POP3 Version&RFC Details .. csv-table:: :file: ./POP3/POP3_RFC.csv :widths: 1,10,10,10,30 :header-rows: 1 .. _POP3_step19: .. tab-set:: .. tab-item:: POP3 Basic Setup on Ubuntu using IPv4 * setup .. _POP3_step20: .. tab-set:: .. tab-item:: POP3 Basic Setup on Ubuntu using IPv6 * setup .. _POP3_step6: .. tab-set:: .. tab-item:: POP3 Protocol Packet Details **POP3 COMMAND LINE Packet** .. csv-table:: :file: ./POP3/POP3_Command_Line_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **POP3 RESPONSE LINE Packet** .. csv-table:: :file: ./POP3/POP3_Response_Line_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **POP3 MESSAGE HEADER Packet** .. csv-table:: :file: ./POP3/POP3_Message_Header_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **POP3 MESSAGE BODY Packet** .. csv-table:: :file: ./POP3/POP3_Message_Body_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **POP3 TERMINATION SEQUENCE Packet** .. csv-table:: :file: ./POP3/POP3_Termination_sequence_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **POP3 AUTHENTICATION DATA Packet** .. csv-table:: :file: ./POP3/POP3_Authentication_Data_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **POP3 TCP/IP HEADER Packet** .. csv-table:: :file: ./POP3/POP3_TCP_IP_Header_Packet.csv :widths: 10,20,30,10 :header-rows: 1 .. _POP3_step7: .. tab-set:: .. tab-item:: POP3 Usecases .. csv-table:: :file: ./POP3/POP3_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _POP3_step8: .. tab-set:: .. tab-item:: POP3 Basic Features .. csv-table:: :file: ./POP3/POP3_Features.csv :widths: 10,10,30 :header-rows: 1 .. _POP3_step9: .. tab-set:: .. tab-item:: POP3 Feature : Simple Protocol **Simple Protocol - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature1_Simple_Protocol_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step10: .. tab-set:: .. tab-item:: POP3 Feature : Email Download **Email Download - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature2_Email_Download_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step11: .. tab-set:: .. tab-item:: POP3 Feature : Offline Access **Offline Access - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature3_Offline_Access_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step12: .. tab-set:: .. tab-item:: POP3 Feature : Server Cleanup **Server Cleanup - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature4_Server_Cleanup_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step13: .. tab-set:: .. tab-item:: POP3 Feature : Limited Command Set **Limited Command Set - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature5_Limited_Command_Set_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step14: .. tab-set:: .. tab-item:: POP3 Feature : Authentication Support **Authentication Support - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature6_Authentication_Support_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step15: .. tab-set:: .. tab-item:: POP3 Feature : Port Based Communication **Port Based Communication - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature7_Port_Based_Communication_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step16: .. tab-set:: .. tab-item:: POP3 Feature : No Folder Support **No Folder Support - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature8_No_Folder_Support_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step17: .. tab-set:: .. tab-item:: POP3 Feature : Optional TLS Encryption **Optional TLS Encryption - Testcases** .. csv-table:: :file: ./POP3/POP3_Feature9_Optional_TLS_Encryption_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _POP3_step18: .. tab-set:: .. tab-item:: Reference links * Reference links