IMAP - Internet Message Access Protocol ========================================= .. 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 IMAP?** IMAP stands for Internet Message Access Protocol. It’s a standard email protocol used by email clients to retrieve messages from a mail server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is IMAP useful?** * Access your email from multiple devices (e.g., phone, laptop, tablet). * Keep your emails synchronized across all devices. * Store emails on the server, so they’re not lost if your device is damaged or lost. * Organize emails into folders on the server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * You open your email app (like Outlook, Gmail, Thunderbird). * The app connects to the mail server using IMAP. * It displays a copy of your emails stored on the server. * When you read, delete, or move an email, the change is made on the server. * Any other device connected to the same account sees the updated status. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is IMAP used?** * Email clients (e.g., Apple Mail, Microsoft Outlook, Mozilla Thunderbird). * Webmail services (e.g., Gmail, Yahoo Mail, Outlook.com). * Corporate email systems that need centralized email access. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * IMAP is a protocol used by applications (like email clients) to access and manage email on a server. * It does not deal with how data is transmitted, but rather what data is transmitted and how it’s interpreted by the application. * It relies on lower layers (like TCP at Layer 4) to handle the actual data transport. * Therefore, IMAP belongs to the Application Layer (Layer 7) of the OSI model. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Does IMAP support email folders?** Yes. IMAP lets users: * Create custom folders. * Move, copy, and delete messages. * Keep folder structure synced across devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What email clients support IMAP?** All major ones: * Gmail. * Outlook / Microsoft 365. * Mobile Mail apps (iOS, Android). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are the limitations of IMAP?** * Depends on server storage capacity. * Slightly more bandwidth use than POP3. * Offline access limited to cached emails unless explicitly downloaded. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Does IMAP download full emails or just headers?** By default, only headers are downloaded. Full emails (body and attachments) are fetched when opened. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are some applications that use IMAP?** * Email Clients (Desktop-Based). * Mobile Email Apps. * Webmail Interfaces. * Server Software with IMAP Support. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is the working flow of IMAP?** Email is Received by Mail Server * An email arrives at your mail server (e.g., Gmail, Outlook). * It is stored on the server, not downloaded. Email Client Connects to IMAP Server * You open your email app (e.g., Outlook, Thunderbird, Gmail app). * The client connects to the IMAP server using: * Port 993 (SSL/TLS). * Or port 143 (STARTTLS). * User Authenticates * The email client logs in with: * Username (email address). * Password. * Email Headers Are Fetched * IMAP downloads only email headers first (subject, sender, date). * The full message is not yet downloaded. * User Views or Opens an Email * When you click on an email, the client requests the full content from the server. * Body and attachments are downloaded temporarily. * Actions Are Synced with Server * Any action you take (read, delete, move, mark as unread) is sent to the server. * This keeps everything synced across devices (PC, mobile, webmail). * Folders Are Managed on Server * IMAP allows the client to access: * Inbox, Sent, Drafts, Trash. * Custom folders (e.g., “Work” or “Receipts”) * You can create/move folders and emails, and changes reflect on all devices. Client Disconnects (Gracefully) * Once you’re done, the client may close the session using LOGOUT. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is IMAP suitable for mobile devices?** Yes. IMAP is ideal for syncing mail between desktop, web, and mobile clients. .. 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:`IMAP Version&RFC Details ` * :ref:`IMAP Basic Setup on Ubuntu using IPv4 ` * :ref:`IMAP Basic Setup on Ubuntu using IPv6 ` * :ref:`IMAP Protocol Packet Details ` * :ref:`IMAP Usecases ` * :ref:`IMAP Basic Features ` * :ref:`IMAP Feature : Remote Email Access ` * :ref:`IMAP Feature : Multi Device Synchronization ` * :ref:`IMAP Feature : Selective Downloading ` * :ref:`IMAP Feature : Folder Management ` * :ref:`IMAP Feature : Message Flags ` * :ref:`IMAP Feature : Concurrent Access ` * :ref:`IMAP Feature : Offline Access Support ` * :ref:`IMAP Feature : Search Capability ` * :ref:`IMAP Feature : Partial Fetch ` * :ref:`IMAP Feature : Server Side Storage ` * :ref:`Reference links ` .. _IMAP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _IMAP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _IMAP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _IMAP_step5: .. tab-set:: .. tab-item:: IMAP Version&RFC Details .. csv-table:: :file: ./IMAP/IMAP_RFC.csv :widths: 1,10,10,10,30 :header-rows: 1 .. _IMAP_step20: .. tab-set:: .. tab-item:: IMAP Basic Setup on Ubuntu using IPv4 * setup .. _IMAP_step21: .. tab-set:: .. tab-item:: IMAP Basic Setup on Ubuntu using IPv6 * setup .. _IMAP_step6: .. tab-set:: .. tab-item:: IMAP Protocol Packet Details **IMAP COMMAND LINE Packet** .. csv-table:: :file: ./IMAP/IMAP_Command_Line_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **IMAP RESPONSE LINE Packet** .. csv-table:: :file: ./IMAP/IMAP_Response_Line_Packet.csv :widths: 10,20,30,10 :header-rows: 1 **IMAP LITERAL DATA BLOCK Packet** .. csv-table:: :file: ./IMAP/IMAP_Literal_Data_Block.csv :widths: 10,20,30,10 :header-rows: 1 .. _IMAP_step7: .. tab-set:: .. tab-item:: IMAP Usecases .. csv-table:: :file: ./IMAP/IMAP_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _IMAP_step8: .. tab-set:: .. tab-item:: IMAP Basic Features .. csv-table:: :file: ./IMAP/IMAP_Features.csv :widths: 10,10,30 :header-rows: 1 .. _IMAP_step9: .. tab-set:: .. tab-item:: IMAP Feature : Remote Email Access **Remote Email Access - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature1_Remote_Email_Access_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step10: .. tab-set:: .. tab-item:: IMAP Feature : Multi Device Synchronization **Multi Device Synchronization - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature2_Multi_device_Synchronization_Test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step11: .. tab-set:: .. tab-item:: IMAP Feature : Selective Downloading **Selective Downloading - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature3_Selective_Downloading_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step12: .. tab-set:: .. tab-item:: IMAP Feature : Folder Management **Folder Management - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature4_Folder_Management_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step13: .. tab-set:: .. tab-item:: IMAP Feature : Message Flags **Message Flags - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature5_Message_Flags_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step14: .. tab-set:: .. tab-item:: IMAP Feature : Concurrent Access **Concurrent Access - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature6_Concurrent_Access_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step15: .. tab-set:: .. tab-item:: IMAP Feature : Offline Access Support **Offline Access Support - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature7_Offline_Access_Support_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step16: .. tab-set:: .. tab-item:: IMAP Feature : Search Capability **Search Capability - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature8_Search_Capability_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step17: .. tab-set:: .. tab-item:: IMAP Feature : Partial Fetch **Partial Fetch - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature9_Partial_Fetch_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step18: .. tab-set:: .. tab-item:: IMAP Feature : Server Side Storage **Server Side Storage - Testcases** .. csv-table:: :file: ./IMAP/IMAP_Feature10_Server_side_Storage_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _IMAP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links