OmniShield ICES: Asynchronous AI Email Security Middleware
Mail-server gateway (Postfix Milter) that intercepts every inbound message, runs a fine-tuned BERT core (M-BSCE) through an asynchronous inference pipeline (RabbitMQ + Celery), and adds multimodal threat detection (PaddleOCR for Quishing) with SOAP clawbacks to the upstream mail system.
- Quishing detection
- 98%+
- p95 classification
- <400ms
- Async throughput
- 5k msg/min
Problem & Solution
The Problem
Enterprise tenants receive thousands of mixed-format emails daily — phishing, quishing (QR-code phishing), invoice fraud, and social engineering. Existing gateways rely on signature lists and shallow regex; they miss novel attacks and have no way to retroactively claw back a message that was already delivered.
The Solution
Built a Postfix Milter that intercepts every SMTP transaction, enqueues the message to RabbitMQ, and routes it through Celery workers running M-BSCE (a fine-tuned BERT classifier) plus PaddleOCR for QR-code image inspection. Threats trigger a SOAP callback to the upstream MAPI service that revokes the message across the tenant's mailbox.
System Architecture
End-to-end flow from intake to outcome
- 01
SMTP Intercept
PostfixPythonPostfix Milter accepts every inbound message and forwards raw MIME to the broker.
- 02
Async Inference
RabbitMQCeleryRabbitMQ queues message events; Celery workers pull and run the M-BSCE classifier.
- 03
M-BSCE Classifier
BERTPEFTFine-tuned BERT core scores phishing / fraud / impersonation intent with PEFT.
- 04
Multimodal Quishing
PaddleOCRPaddleOCR inspects QR-code images embedded in the message body or attachments.
- 05
SOAP Clawback
SOAPFastAPIThreat verdict triggers a SOAP callback to upstream MAPI to revoke the message.
Engineering Challenges & Wins
Optimization results and engineering tradeoffs
Optimization Results
- M-BSCE fine-tuned BERT core for context-aware email threat classification.
- Asynchronous inference pipeline (RabbitMQ + Celery) keeps mail delivery non-blocking.
- Multimodal threat detection: PaddleOCR inspects QR-code images (Quishing) embedded in messages.
- SOAP clawback to upstream MAPI for retroactive message revocation across the tenant.
Engineering Challenges
- Keeping classification latency low without blocking the SMTP transaction.
- Detecting QR-code phishing inside image-only attachments without false positives.
- Retroactively revoking a message already delivered to multiple mailboxes.
Related Projects
Autonomous multi-channel AI platform that unifies chat, voice, and email behind microservices and an API gateway, with shared context across channels.
- Channels
- 3 unified
- Tenant onboard
- <1 day
- Cross-channel memory
- 100%
Telecom recommendation agent fine-tuned on Qwen2.5-3B with LoRA, quantized to GGUF via Unsloth for cheap, low-latency inference.
- Model size
- 3B params
- Quantization
- GGUF Q4
- Rec accuracy
- +34% vs base