Skip to main content
Back to Projects
Autonomous AI AgentsFeaturedJan 2025 → Present

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.

PythonPostfix MilterRabbitMQCeleryBERTPEFTPaddleOCRFastAPISOAPDockerUbuntu Linux
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

  1. 01

    SMTP Intercept

    PostfixPython

    Postfix Milter accepts every inbound message and forwards raw MIME to the broker.

  2. 02

    Async Inference

    RabbitMQCelery

    RabbitMQ queues message events; Celery workers pull and run the M-BSCE classifier.

  3. 03

    M-BSCE Classifier

    BERTPEFT

    Fine-tuned BERT core scores phishing / fraud / impersonation intent with PEFT.

  4. 04

    Multimodal Quishing

    PaddleOCR

    PaddleOCR inspects QR-code images embedded in the message body or attachments.

  5. 05

    SOAP Clawback

    SOAPFastAPI

    Threat 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.

More case studies

Explore other production systems I've engineered end-to-end.

All Projects

Related Projects

Autonomous AI AgentsFeatured
OpenClaw Multi-Channel Orchestration

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%
OpenClawFastAPIWebRTCWebSocketRabbitMQ+4
Autonomous AI AgentsFeatured
Autonomous eSIM Recommendation Agent

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
PythonQwen2.5-3BLoRAUnslothGGUF+2