Perfcopilot

IMAP

For mailboxes outside Gmail and Microsoft 365. PerfCopilot speaks the standard IMAP protocol against Fastmail, Zoho Mail, Proton Business (via Proton Bridge), and any self-hosted mail server that supports IMAP over TLS.

The signal output is identical to Gmail and MS Graph — same six metrics, same [EMAIL DATA] prompt block. Only the transport differs.

What we pull

For each connected mailbox per cycle:

  • Sent count — messages sent during the cycle window. Headline metric emails_sent.
  • Received count — non-bulk messages received. Newsletters, mailing lists, and transactional emails are filtered out (see Bulk filter below).
  • Thread initiations — distinct conversations the employee started.
  • Cross-team threads — outgoing threads where the To/Cc spans multiple domains.
  • After-hours sent — count of messages sent outside 8am–7pm local.
  • Avg reply time — mean response time on real (non-bulk) parent threads, ≤72h.

Plus a side-channel bulk_received_count so the AI prompt can mention "subscribed to ~120 newsletters" honestly without polluting the headline metric.

We pull header metadata only — sender, recipient, date, thread linkage. We never read message bodies, subjects (beyond length), or attachments.

Connecting

IMAP is per-employee, like Gmail and MS Graph — each mailbox needs its own credentials. The admin form-fill flow lets one admin set up the whole team without each employee needing to log in. Per-employee self-service will follow.

As an admin

  1. Go to /admin?tab=integrations and find the IMAP card under Communications.
  2. Click Connect.
  3. Pick the employee whose mailbox you're configuring.
  4. Enter their email and password.
    • For Fastmail, Zoho, ProtonMail Bridge — use the app password the provider generated, not the account password.
    • For self-hosted servers — whatever credentials the user normally uses for IMAP.
  5. PerfCopilot auto-detects the server. If your domain publishes Mozilla autoconfig or _imaps._tcp SRV records (most major providers do), the host/port fill themselves in.
  6. If auto-detect misses, click Advanced and enter host / port / Sent folder / encryption mode manually.
  7. Test & save — PerfCopilot opens a real IMAP connection to verify before saving. If the test fails, the credentials are not stored.

As an employee (self-service)

If your admin has enabled IMAP for your org but hasn't filled in your mailbox:

  1. Sign in to PerfCopilot at app.perfcopilot.com.
  2. Click your avatar → AccountIntegrations.
  3. Find the IMAP card, click Connect.
  4. Enter your email + password (use an app password for Fastmail/Zoho/Proton).
  5. Auto-detect resolves the server; click Test & save.

Your password is encrypted at rest and only used for read-only IMAP fetches.

Auth notes

  • Basic IMAP only — username + password (where "password" is whatever the provider gave). OAuth2 SASL is not supported in v1; if you're on Gmail or Microsoft 365, use those integrations directly — they're better.
  • TLS is hard-required. Plain IMAP on port 143 without STARTTLS is rejected. No override.
  • Passwords are encrypted at rest using the same pipeline as our OAuth tokens.

Bulk filter

Newsletters and transactional emails (order confirmations, calendar invites, mailing list digests, vacation responders) inflate the "emails received" count without reflecting real communication. PerfCopilot detects them from four headers — List-Unsubscribe, List-Id, Precedence, Auto-Submitted — and excludes them from emails_received, avg_reply_time_hours, and cross_team_threads.

This same filter is applied to Gmail and MS Graph signals — switching email source doesn't change the meaning of the numbers.

What hits a review

[EMAIL DATA]
emails_sent:           87
emails_received:       154
bulk_received_count:   132        # newsletters etc., not in emails_received
thread_initiations:    21
cross_team_threads:    8
after_hours_sent:      6
avg_reply_time_hours:  3.4

Plus a [BASELINES] line with the team / department / org cohort median for emails_sent.

Troubleshooting

"Authentication failed"

Most common cause: providers like Fastmail, Zoho, and Proton require an app password rather than the account password. Generate one from your mail provider's security settings.

For self-hosted servers: confirm the account allows IMAP access (some sysadmins lock it down to webmail only).

"Couldn't find the Sent folder"

PerfCopilot first asks the server which folder has the \Sent SPECIAL-USE flag (RFC 6154). If your server doesn't expose that, it falls through a list of common names (Sent, Sent Items, [Gmail]/Sent Mail, INBOX.Sent, Outbox).

If none match, reveal Advanced and type the exact folder name your server uses. Common cases:

  • Localized servers (Italian → Inviato, German → Gesendet).
  • Hierarchical IMAP namespaces (INBOX.Sent instead of Sent).
  • Custom layouts on legacy self-hosted boxes.

"Your mail server doesn't support TLS"

We don't support plain IMAP. Use a server that supports IMAPS on port 993 or STARTTLS on port 143.

"Couldn't auto-detect your mail server"

The 4-stage cascade missed. Click Advanced and enter the details manually. Common defaults:

| Provider | Host | Port | Encryption | |---|---|---|---| | Fastmail | imap.fastmail.com | 993 | SSL | | Zoho Mail | imap.zoho.com | 993 | SSL | | Proton Bridge | 127.0.0.1 | 1143 | STARTTLS | | Self-hosted Dovecot | (your hostname) | 993 | SSL |

Privacy notes

  • Header metadata only — never message bodies, never attachments, never subjects (we record subject length but not text).
  • Passwords encrypted at rest using the standard PerfCopilot token-encryption pipeline.
  • TLS hard-required — no plain connections.
  • Autoconfig discovery hits autoconfig.<your-domain> server-side. This reveals your email domain (already publicly observable from MX records). Your password never leaves PerfCopilot.
  • Failed login attempts on the test-connection endpoint are rate-limited and audit-logged for org-admin review.