Expand description
POP3 protocol implementation for RusMES
This crate provides a full-featured, RFC 1939-compliant POP3 server implementation built on Tokio for asynchronous I/O.
§RFC Compliance
- RFC 1939: Post Office Protocol version 3 (full command set)
- RFC 2449: POP3 Extension Mechanism (CAPA command)
- RFC 2595: STLS extension for TLS upgrade
§Supported Commands
§Authorization State
USER/PASS— Username and password authenticationAPOP— MD5 digest authentication with timestamp challengeCAPA— Capability listingSTLS— Initiate TLS upgrade (if enabled)QUIT— Disconnect without applying changes
§Transaction State
STAT— Mailbox status (message count and total octets)LIST— Message listing with sizesRETR— Retrieve a complete messageDELE— Mark a message for deletionRSET— Reset all deletion marksTOP— Retrieve message headers and N body linesUIDL— Unique ID listing per messageNOOP— Keep connection aliveQUIT— Enter Update state, commit deletions, then disconnect
§Modules
command: POP3 command enumeration.parser: POP3 command line parser.response: POP3 response formatting (+OK/-ERR).server: Async TCP listener accepting POP3 connections.session: Per-connection state machine (Authorization → Transaction → Update).
§Security
APOP challenge generation uses getrandom for cryptographic quality randomness.
In production deployments, STLS should be enabled to protect USER/PASS credentials.
Structs§
- Pop3
Config - POP3 session configuration
- Pop3
Response - POP3 response
- Pop3
Server - POP3 server
- Pop3
Session - POP3 session handler
Enums§
- Pop3
Command - POP3 commands as defined in RFC 1939
- Pop3
State - POP3 session state
- Pop3
Status - POP3 response status
Functions§
- parse_
command - Parse a complete POP3 command line