POP3/SMTP proxy correctness fixes.
- RETR now returns the message body (reads the FETCH tuple). Closes #1
- Maildrop snapshotted once; DELE marks survive STAT/LIST/UIDL. Closes #2
- RETR/TOP dot-stuff and CRLF-terminate per RFC 1939. Closes #3
- SMTP relays raw bytes, no UTF-8 mangling. Closes #4
- Message sizes batched in one IMAP round-trip off the event loop; IMAP timeout added. Closes #5
- POP3 TOP implemented. Closes #6
pytest: 10 passed.
Fix several POP3/IMAP proxy correctness defects:
- RETR returned an empty body because fetch_message kept only top-level
bytes from the imaplib FETCH response; extract the RFC822 literal from
the response tuple instead.
- DELE marks were wiped mid-session because STAT/LIST/UIDL refreshed the
mailbox and cleared the deleted set. Snapshot the UID list once at
authentication and keep the maildrop static for the session lifetime.
- RETR/TOP output now normalises line endings to CRLF, byte-stuffs lines
beginning with ".", and emits the terminating ".\r\n" per RFC 1939.
- STAT/LIST batch message sizes via a single threaded UID FETCH and the
IMAP client now uses a 30s socket timeout, keeping blocking work off the
event loop.
- Implement the POP3 TOP command (headers plus first n body lines).
Fixes#1Fixes#2Fixes#3Fixes#5Fixes#6
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
send_message decoded the message body with utf-8/errors="replace",
corrupting 8-bit content before forwarding. Pass the raw bytes straight
to smtp.sendmail so the message is relayed unchanged.
Fixes#4
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
POP3/SMTP proxy correctness fixes.
pytest: 10 passed.