Smart Scan: How our Heuristic Analysis Protects You
An inside look at the logic MailGuard uses to detect One-Time Passwords (OTPs) and urgent alerts, even in strict blocking modes.
Smart Scan: How Heuristic Analysis Protects You
A dumb firewall blocks everything. A smart firewall knows when to bend the rules.
One of the biggest fears of using email aliases is Missing Critical Information. You might set an alias to "Block All" because you are sick of the newsletter, but what if you need to reset your password on that site 6 months later?
Normally, you'd have to log in to MailGuard, find the alias, unblock it, request the reset, and then re-block it. Friction.
Enter Smart Scan: our heuristic engine designed to let the important stuff through the cracks.
The Logic Pipeline
Every email passes through a series of "Gates" before it is forwarded or dropped.
Gate 1: Regex Pattern Matching (The Speed Layer)
Running a full AI model on every spam email is slow and expensive. First, we use highly optimized Regular Expressions (Regex) to catch 90% of transactional emails.
We scan the Subject and first 1kb of the Body for patterns like:
\b\d{6}\b(Standalone 6-digit codes)verify your emailreset passwordconfirmation code
If these patterns are found with high confidence, the email is flagged as Transactional and allowed through strict filters.
Gate 2: LLM Validation (The Intelligence Layer)
Patterns are easily fooled. A spammer could write "Here is your 123456 prize!" to bypass regex. If the Regex layer is suspicious but concise, we pass the snippet to a lightweight Large Language Model (LLM) running at the edge.
We ask the model a specific question:
"Classify this email snippet: [Transactional / OTP / Marketing / Spam]. Only return the classification."
This helps distinguish between:
- "Your bank verification code is 592011" -> ALLOW
- "Win $592,011 in our lottery!" -> BLOCK
Privacy First
This analysis happens entirely in active memory (RAM) during the Cloudflare Worker execution.
- We do not train models on your data.
- We do not log the content analyzed.
- The context window is stripped of PII (Personally Identifiable Information) where possible before analysis.
User Control
Smart Scan is Opt-In on a per-alias or global basis. You always have the final say. If you want a "Hard Block" where absolutely nothing gets through—even a password reset—you can disable Smart Scan for that specific alias.
This gives you the best of both worlds: the peace of mind of a "Block All" policy, with the safety net of an intelligent assistant watching the door for emergencies.