pyr0ball opened issue Circuit-Forge/avocet#7

pyr0ball
Wed, 04 Mar 2026 09:31:57 -0800

7#[New Feature] Multi-account IMAP fetch — connect multiple email accounts for label training data#

Overview

Design doc: docs/plans/2026-02-27-avocet-multidomain-design.md

Avocet currently reads from a local JSONL file. Full multi-account IMAP support would allow:

1. Connecting multiple email accounts (e.g. Gmail, Outlook, custom IMAP)

2. Fetching emails matching configurable filters (subject keywords, date range, folder)

3. Staging fetched emails into the existing data/queue.jsonl pipeline

4. Respecting per-account rate limits and credential storage (never log credentials)

Key Decisions

Credentials stored in config/imap_accounts.yaml (gitignored; .example committed)

OAuth2 for Gmail/Outlook; IMAP/STARTTLS for custom servers

Fetch deduplication via message ID hash

./manage.sh fetch triggers a manual pull; background polling is a future feature

Acceptance Criteria

./manage.sh fetch fetches emails from all configured accounts and appends to queue

Duplicate message IDs are not re-added

Credentials are never written to logs or committed

At least one adapter tested: Gmail OAuth2 or generic IMAP