Phase 2a of the DLP and mail flow rules spec: pure functions in crates/features/src/mailflow, nothing wired into the mail path yet. - Detectors report distinct values found, each either checked by its published check digit or counted only beside a corroborating word within 50 characters. This PR adds the region-free ones: payment cards (issuer prefixes, Luhn), IBAN (registry lengths, mod 97), SWIFT/BIC, email addresses and phone numbers in bulk, dates of birth, passport numbers, private keys and published service-token formats. Regional identifiers follow, a region per PR. - Word lists (Aho-Corasick, whole words, any case) and patterns (regex with a compiled-size limit) count occurrences. - Attachment text: text files with or without a UTF-16 mark, HTML, DOCX/XLSX/PPTX, ODT/ODS/ODP and ZIP archives one level deep, read with the zip and quick-xml crates the workspace already has. Encrypted files, PDF, legacy binary Office files, nested archives and anything past the limits come back as not inspectable, with why. 21 unit tests, against the networks' test card numbers and the IBAN registry's own examples among others.
32 lines
935 B
Rust
32 lines
935 B
Rust
/*
|
|
* SPDX-FileCopyrightText: 2026 Coffey Labs
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
//! INBUXA's rebuilt features.
|
|
//!
|
|
//! Upstream ships these only in its Enterprise Edition. INBUXA rebuilds each
|
|
//! one clean-room from a written spec under `docs/spec/features/`, one module
|
|
//! per feature, and ships it to everybody (docs/spec/SPEC.md §2.3, §3).
|
|
//!
|
|
//! Upstream files change only by small hooks that call in here, each marked
|
|
//! with an `inbuxa:` comment naming the requirement it serves. That keeps
|
|
//! every upstream merge's conflicts few and predictable.
|
|
//!
|
|
//! This crate sits below `common`, so hooks anywhere in the server can call
|
|
//! it. It works on registry objects and the store directly, never on
|
|
//! `common::Server`.
|
|
|
|
pub mod ai;
|
|
pub mod audit;
|
|
pub mod branding;
|
|
pub mod hold;
|
|
pub mod lock;
|
|
pub mod mailflow;
|
|
pub mod masked_email;
|
|
pub mod privacy;
|
|
pub mod security;
|
|
pub mod tenancy;
|
|
pub mod undelete;
|