Skip to Content
SourcesEmail

Email

Email

Scan IMAP mailboxes (Gmail, Outlook/M365, and more) for messages and attachments.

Category
Collaboration
Source type
EMAIL
Produces
emailattachment

Mailboxes are the least-governed data store in most organisations. Contracts, invoices, spreadsheets of customer data, credentials sent “just this once” — they all live there indefinitely, in attachments nobody has looked at in years.

What you need to connect

An IMAP host and port (993 for IMAPS), and the mailbox login. For Gmail and Outlook / Microsoft 365, use an app password rather than the account password — it’s revocable and scoped to one application.

Any IMAP server works: Gmail, Outlook, Yahoo, Fastmail, Zimbra, Dovecot, whatever you run yourself.

What Classifyre reads

Each message becomes an asset — sender, recipients, subject and body — and each attachment becomes a separate asset linked back to its email.

Scope the scan by:

  • Folders — Inbox only, or Sent, Archive, and any custom folder.
  • Date range — messages on or after a date, before a date, or both.
  • Unread only — for a monitoring-style scan.
  • Attachment size cap — oversized attachments still produce an asset with their metadata; only the bytes are skipped.

Attachments are read with the shared file pipeline: see Supported File Formats for everything it can open, and OCR & Transcription for reading text out of images, audio and video.

Metadata on every asset

Asset kind · email

FieldTypeAlways presentWhat it is
message_idstringYesRFC 5322 Message-ID header (stable dedup key)
subjectstringYesEmail subject line
from_addressstringYesSender email address (From header)
to_addressesstring[]NoRecipient addresses (To header)
cc_addressesstring[]NoCarbon-copy addresses (Cc header)
datestringNoMessage date (ISO 8601)
folderstringNoMailbox folder the message was fetched from
sender_domainstringNoDomain parsed from the From address
reply_tostringNoReply-To header
in_reply_tostringNoIn-Reply-To header (parent message id)
referencesstringNoReferences header (thread chain)
has_htmlbooleanNoWhether the message has an HTML body part
attachment_countintegerNoNumber of attachments on the message
spfstringNoSPF result parsed from Authentication-Results
dkimstringNoDKIM result parsed from Authentication-Results
dmarcstringNoDMARC result parsed from Authentication-Results

Asset kind · attachment

FieldTypeAlways presentWhat it is
size_bytesintegerYesRaw byte size
mime_typestringYesMIME type
parse_errorstringNoSet when content extraction failed
filenamestringYesOriginal file name
image_widthintegerNoWidth in pixels
image_heightintegerNoHeight in pixels
page_countintegerNoNumber of pages (pdf)
paragraph_countintegerNoNumber of paragraphs (docx)
table_countintegerNoNumber of tables (docx)
row_countintegerNoNumber of data rows
columnsobject[]NoColumns as {name, type} objects (type may be empty for csv/xlsx)
encodingstringNoDetected character encoding
json_root_typestringNoRoot JSON type: object, array, or scalar
top_level_keysintegerNoNumber of top-level keys when the root is an object
array_lengthintegerNoLength when the root is an array
parent_email_hashstringYesHash of the parent email asset
sha256stringNoSHA-256 of the attachment bytes
is_inlinebooleanNoWhether the attachment is inline (e.g. embedded image)
content_idstringNoContent-ID header for inline parts

Lineage

Lineage

This source records no lineage. Nothing in the system it reads describes data moving from one place to another, so no FLOW edges are produced. Related items are still linked — see Lineage & Relationships for what those links mean and how they differ from lineage.

Worth knowing

  • Messages are read, never modified. Nothing is marked as read, moved or deleted by a scan.
  • Attachments are where the findings are. The body of an email is usually innocuous; the spreadsheet attached to it usually is not.
  • A shared or archive mailbox is often the better target than an individual one — it’s where retention actually accumulates.

Configuration

Beyond the fields below, every source also has the settings shared by all of them: the sampling strategy, the detectors to run, the scan schedule, and the compute limits for its scan jobs.

Required

Without these, the source will not save.

FieldTypeRequiredWhat it doesDefault
requiredobjectYesno extra properties
hoststringYesIMAP server host (e.g. imap.gmail.com, outlook.office365.com)
portintegerNoIMAP server port (993 for IMAPS)min 1, max 65535993

Secrets

Stored encrypted and never shown again after you save them. See Configuration & Fields.

FieldTypeRequiredWhat it doesDefault
maskedobjectYesno extra properties
passwordstringYesAccount or app-specific password (use an app password for Gmail/Outlook)
usernamestringYesMailbox login (usually the full email address)

Optional

Everything you can tune. Sensible defaults apply when you leave them alone.

FieldTypeRequiredWhat it doesDefault
optionalobjectNono extra properties
connectionobjectNoTransport-level connection controls.no extra properties
connection.timeout_secondsintegerNoSocket timeout for IMAP operationsmin 130
connection.use_sslbooleanNoConnect over implicit TLS (IMAPS). Disable only for STARTTLS/plain servers.true
scopeobjectNoWhich messages and attachments to ingest.no extra properties
scope.before_datestringNoOnly fetch messages before this date (ISO 8601 date)
scope.foldersarrayNoMailbox folders to scan["INBOX"]
scope.folders[]stringNo
scope.include_attachmentsbooleanNoEmit attachments as separate assets linked to the emailtrue
scope.max_attachment_size_bytesintegerNoSkip downloading attachment bytes above this size (still emits a metadata-only asset). Unset means no limit.min 0
scope.since_datestringNoOnly fetch messages on/after this date (ISO 8601 date, e.g. 2026-01-01)
scope.unseen_onlybooleanNoOnly fetch unread (UNSEEN) messagesfalse
Last updated on