# How to redact PII from email archives at scale

Canonical: https://refer.sourcex.si/guides/redact-pii-from-emails
Last updated: 2026-11-03

To redact PII from emails at scale, agree a written specification with the company first, then process each message in parts: headers, body, signature, quoted replies and attachments. Replace every person and identifier with the same token across the whole archive, deduplicate threads before review, and sign off only after a sampled manual check passes.

## The short answer: treat every email as five documents

Redacting PII from an email archive at scale means splitting each message into headers, body, signature, quoted history and attachments, redacting each part with rules suited to it, and replacing every person and identifier with the same token wherever it appears. A single reply-all can carry a customer's mobile number three times: in a signature, deep in the quoted thread and on an attached invoice.

For an owner weighing a license, the reassuring point is that de-identification is a defined, written process agreed with the company before work begins. On SourceX deals, no email leaves the company before a license agreement has been signed by all parties and the company has given its go-ahead. SourceX then de-identifies the data, through approved processing routes, under that specification.

Email earns the effort because it records how decisions are made, escalated and resolved across a business; [why business email archives are valuable for AI](/proof/why-email-data-is-valuable) explains what buyers look for.

## What has to be decided before processing starts?

- **Scope.** Which mailboxes, departments and years are in, and which are excluded outright. Counsel threads, HR investigations, board correspondence and personal, non-business mail are the usual exclusions.
- **The privacy regimes in play.** US and EU definitions of personal data differ, as the [PII vs personal data comparison](/compare/pii-vs-personal-data) explains. The [GDPR](https://eur-lex.europa.eu/eli/reg/2016/679/oj) can apply to organizations outside the EU that offer goods or services to, or monitor the behavior of, people in the EU, so correspondence with EU contacts raises questions even for a company in the U.S., Canada, the EU, the UK, Australia, New Zealand, India, Singapore, South Africa, Latin America, the UAE or Saudi Arabia (outside the U.S., Canada and the EU, at least 70% of the data must be in English). Where messages carry health information from a HIPAA context, HHS recognizes two [de-identification methods](https://www.hhs.gov/hipaa/for-professionals/special-topics/de-identification): Safe Harbor, which removes 18 specified identifiers, and Expert Determination, where a qualified expert documents that re-identification risk is very small. California raises its own question, covered in [whether licensing counts as a CCPA sale](/questions/is-licensing-data-a-sale-under-ccpa).
- **Security duties.** A covered financial institution under the FTC's [Safeguards Rule](https://www.ecfr.gov/current/title-16/chapter-I/subchapter-C/part-314) must maintain a written information security program that includes encrypting customer information in transit over external networks and at rest, so a working copy of an archive holding customer information needs the same protection. The [Safeguards Rule guide for CPA firms](/guides/ftc-safeguards-rule-cpa-firms) shows how that plays out for one profession.
- **The specification.** Entity list, token scheme, what stays, how each attachment type is treated, and the pass mark for the sample check.

## Which parts of an email carry PII?

| Part | Typical PII | Handling rule |
|---|---|---|
| Address headers (From, To, Cc, Bcc, Reply-To) | Names and addresses of every participant | Map each address to a person token; keep a label for internal, customer or vendor |
| Routing headers and message IDs | IP addresses, server names, device details | Drop routing chains; issue new IDs that keep threads linked |
| Subject line | Customer names, claim or order numbers | Same rules as the body; redact once and reuse across the thread |
| Body | Names, phone numbers, addresses, account numbers, dates of birth | Pattern, entity-model and dictionary detection |
| Signature block | Name, title, direct line, mobile, office address, profile links | Detect the block, replace contact details, keep the job title if the spec allows |
| Quoted replies and forwards | Earlier messages, often from external parties | Redact each unique segment once, then reuse the result |
| Attachments | Invoices, resumes, contracts, spreadsheets, scanned forms | Extract text, OCR images, or exclude file types by rule |
| Calendar invites | Attendee lists, dial-in numbers, meeting links | Treat as headers plus body |

## How to redact an email archive, step by step

1. **Export and freeze a copy.** Use the mail platform's eDiscovery or archive tools to export the agreed mailboxes in a standard format such as PST, MBOX or EML. Record message, mailbox and attachment counts so nothing is lost or added silently.
2. **Apply exclusions first.** Remove excluded mailboxes, folders and correspondents before any redaction, so excluded material is never processed at all.
3. **Thread and deduplicate.** Group messages into conversations and separate quoted history from new text. A thirty-message thread may add one new paragraph per reply; redacting each unique segment once is faster and more consistent than reprocessing the same quoted text again and again.
4. **Build the identity map.** Merge header addresses, the employee directory and CRM contacts into one list of people and organizations, with name variants such as "Dana Ruiz", "Dana", "D. Ruiz" and "druiz@". Each person gets one token for the whole archive.
5. **Detect identifiers in the text.** Run pattern rules for phone, card, account and ID formats; an entity model for names and places the map does not know; the identity map as a dictionary; and signature-block detection, since signatures follow a predictable shape at the end of each message.
6. **Handle attachments by type.** Extract text from documents, OCR scanned PDFs and images, and apply the same rules. Where a file type is high risk and low value, such as exported customer lists, exclude it by rule instead of redacting it.
7. **Replace, then rebuild.** Swap identifiers for tokens while keeping paragraph breaks, quote levels and timestamps, so a reader can still follow who said what and when.
8. **Check a stratified sample by hand.** Draw messages across departments, years, thread lengths and attachment types. Reviewers log every miss by entity type; if misses exceed the pass mark in the specification, fix the rule and reprocess the full archive.
9. **Close out with a log.** Write down which version of the specification and tooling ran, how the sample was drawn, what it found and who signed off. The identity map is the key that reverses the tokens, so it is kept separate and never travels with the dataset.

## Why do consistent tokens matter?

Consistent tokens keep an archive useful. If one customer is [PERSON-0412] in March and [PERSON-0977] in June, a model can no longer see that a single relationship ran through a dozen threads, a pricing dispute and a renewal.

> Illustrative before: "Dana, Mark from Example Supply Co. called again about the March invoice. His cell is 555-0142."
> Illustrative after: "[PERSON-0412], [PERSON-0087] from [ORG-0031] called again about the March invoice. His cell is [PHONE-0219]."

The business content survives: who chased whom, about which invoice, and when. That is the part buyers training agents on real work care about.

## Common mistakes and fixes

| Mistake | What goes wrong | Better approach |
|---|---|---|
| Redacting only the newest message in each thread | Quoted history repeats the original identifiers | Split quoted text, redact each unique segment, propagate |
| A fresh token every time a name appears | Relationships and threads stop making sense | One archive-wide identity map |
| Ignoring Bcc, Reply-To and routing headers | Addresses and IP numbers survive in fields nobody reads | Rebuild headers from the identity map; drop routing data |
| Skipping scanned attachments | Image-only PDFs pass text filters untouched | OCR them or exclude the file type |
| Blacking out every capitalized word | Product names, job titles and places that carry meaning disappear | The specification lists what stays; test for over-redaction in the sample |
| Deleting identifiers instead of tokenizing | Sentences lose their subject and thread structure breaks | A typed token in place of each identifier |
| Shipping the identity map with the data | Anyone holding it can reverse the redaction | The map is kept separate from the dataset |

## Illustrative example: a freight brokerage's sales and operations mail

Illustrative and fictional: a freight brokerage with 220 full-time employees agrees to license eight years of sales and operations email. Its specification excludes legal, HR and board mailboxes, tokenizes people, carriers and shippers, keeps lane descriptions, quote discussions and load outcomes, and excludes spreadsheet attachments.

Deduplication shrinks the text to process considerably, because most of each message is quoted history. The first sample shows driver mobile numbers surviving inside scanned rate confirmations; the team adds OCR for that document type, reprocesses the archive, and the second sample meets the pass mark.

## What this means for owners and the partners who introduce them

For an owner, the takeaway is control. The company sets the exclusions, approves the specification and signs nothing until price and terms work; its archive stays its own, because the data is licensed, not sold.

Partners never export, forward or describe emails. They introduce the company and share basic fit facts. The baseline is a company based in the US that had 50+ full-time employees at peak (contractors excluded), has operated for years with records to show for it, holds the rights to what it would license and has an authorized sponsor, for example its CEO or CFO. A [fit check for companies](/tools/company-fit-checker) gives a quick, non-binding first screen, and [how SourceX referrals work](/how-it-works) lays out the stages. Call recordings bring a different set of problems, covered in [how to redact PII from call transcripts](/guides/redact-pii-from-call-transcripts).

Partners earn the greater of $50,000 plus 5% and 15% of the compensation SourceX actually pays the company you refer, with no cap. A reward becomes payable after SourceX has paid the referred company under its signed agreement and the payout conditions in the program terms are met, including finance approval and your tax and payment details.

This is general information, not legal, tax or financial advice. Confirm privacy and security obligations with your own counsel before acting.

## Next step

If an owner you know has years of business email and fits the baseline, [register as a partner](/register) and introduce them. The company can also file its own application at [sourcex.si/apply](https://sourcex.si/apply).

## Sources

- https://eur-lex.europa.eu/eli/reg/2016/679/oj
- https://www.hhs.gov/hipaa/for-professionals/special-topics/de-identification
- https://www.ecfr.gov/current/title-16/chapter-I/subchapter-C/part-314
