Expand description
POP3 (Post Office Protocol version 3) layer implementation.
Implements RFC 1939 POP3 packet parsing as a zero-copy view into a packet buffer.
§Protocol Overview
POP3 operates over TCP port 110 (or 995 for POP3S). Unlike SMTP, POP3 is used to download mail from a server.
§Packet Format
Client Command:
COMMAND [arguments]\r\nServer Reply:
+OK [text]\r\n (success)
-ERR [text]\r\n (error)Multi-line responses (for LIST, RETR, etc.) end with a line containing only ..
§POP3 Commands (RFC 1939)
| Command | State | Description |
|---|---|---|
| USER | Authorization | User name |
| PASS | Authorization | Password |
| QUIT | Both | Quit |
| STAT | Transaction | Get mailbox status |
| LIST | Transaction | List messages |
| RETR | Transaction | Retrieve message |
| DELE | Transaction | Delete message |
| NOOP | Transaction | No-op |
| RSET | Transaction | Reset (undelete) |
| TOP | Transaction | Get message headers + N body lines |
| UIDL | Transaction | Unique ID listing |
| APOP | Authorization | Authenticated login (MD5) |
| AUTH | Authorization | Authenticate (RFC 1734) |
| CAPA | Both | List capabilities (RFC 2449) |
| STLS | Authorization | Start TLS (RFC 2595) |
Re-exports§
pub use builder::Pop3Builder;
Modules§
- builder
- POP3 packet builder.
Structs§
- Pop3
Layer - A zero-copy view into a POP3 layer within a packet buffer.
Constants§
- CMD_
APOP - CMD_
AUTH - CMD_
CAPA - CMD_
DELE - CMD_
LIST - CMD_
NOOP - CMD_
PASS - CMD_
QUIT - CMD_
RETR - CMD_
RSET - CMD_
STAT - CMD_
STLS - CMD_TOP
- CMD_
UIDL - CMD_
USER - POP3S_
PORT - POP3S (over TLS) port.
- POP3_
MIN_ HEADER_ LEN - Minimum POP3 payload: “+OK\r\n” = 5 bytes or “USER” = 4 bytes.
- POP3_
PORT - POP3 standard port.
Statics§
- POP3_
COMMANDS - POP3_
FIELD_ NAMES - Field names for Python/generic access.
Functions§
- is_
pop3_ payload - Returns true if
buflooks like a POP3 payload. - pop3_
show_ fields - Returns a human-readable display of POP3 layer fields.