PopIt3 routes emails based on the To: header, allowing specialized processing for different recipient addresses. Each filter has distinct logic, storage, and reporting.
newparser_jobserve.py - Full AI-powered job analysis pipeline
Extracts job details from JobServe emails, calls OpenAI for CV matching and scoring (0-10), stores results with reasoning in ~/.jobserve.gdbm keyed by Message-ID. Handles alerts, suggestions, applications, and unclassified emails.
Three report tables: Scored Jobs, Job Applications, Unclassified Emails. Deployed to https://www.critchley.biz/JobAnalysis, updated hourly.
MyDavidLloydSchedule.py - Fitness class booking extraction
Parses David Lloyd booking confirmation and cancellation emails. Extracts class name, instructor, times, location, booking reference. Deduplicates by booking_reference, updates or inserts into ~/.dl.gdbm. Handles timezone normalization (UK BST/GMT).
HTML timetable with weekly/monthly view. Deployed to https://www.critchley.biz/DavidLloyd/timetable.html, updated on each booking/cancellation.
mailspool.py - Routes to Envoy AI Agent mailbox via WebDAV
Extract To header → route to envoy_mail_spool → store locally in ~/py/popit3/envoy/ (maildir structure) → upload to WebDAV /mail/envoy → return UIDL for POP3 deletion
Local: ~/py/popit3/envoy/ (new, cur, tmp)
Remote: /mail/envoy/ on webdav.critchley.biz
Messages deleted from POP3 after successful delivery to WebDAV (delete=True)
process_emails.py - Inline spam filtering
Check To: header against hardcoded blocklist. If matches: return success (no storage), mark for POP3 deletion, optionally log.
mailspool.py - Generic mail router
Route any recipient address not matched above. Store in recipient-specific mailbox (GDBM or file-based), preserve raw MIME structure, enable search across archive.
Location: ~/.mail/spools or ~/.mail/recipients/
Retention: Indefinite (user-managed cleanup)