SQL-Powered Email &
Automation Rules.
Write declarative SQL filter statements to organize inboxes, set flags, route folders, and dispatch signed webhooks — executed in microsecond time inside background sync loops.
Live Interactive NSQL Rule Evaluator
Edit the NSQL query below and run a real in-browser AST evaluation against sample inbox messages with zero mock hardcoding.
Real Dry-Run Evaluation Output
Edit the query in the editor and click "Run Dry-Run Preview" to parse your NSQL text and evaluate real condition matches against sample email envelopes.
Security Enforcement Guarantees
- 100% Parameterized Binding (`sqlx::QueryBuilder`) — Zero SQLi.
- DFA Regex Evaluation with 50ms Hard Timeout — Zero ReDoS.
- Pre-flight DNS Blacklist — Zero SSRF to 127.0.0.1 or cloud metadata.
- HMAC-SHA256 Cryptographic Hash Chain Audit Ledger.
Example NSQL Rule Catalog
Declarative statements compiled into AST objects using sqlparser 0.54.
VIP Priority Router
WHEN sender LIKE '%@kof22.com%' AND subject REGEXP '(Urgent|Architecture)' ON ACCOUNT '*@company.com' THEN MOVE TO 'vip-inbox', SET flagged = TRUE;
Routes urgent architectural reviews from company domain accounts directly into the VIP folder with immediate flagging.
Automated Newsletter Archiver
WHEN body LIKE '%unsubscribe%' THEN MOVE TO 'Newsletters', SET read = TRUE;
Automatically identifies incoming commercial newsletters, moves them out of the main inbox, and marks them as read.
Spam & Malicious Attachment Purge
WHEN header['X-Spam-Score'] > 5 OR attachment_name LIKE '%.exe' THEN MOVE TO 'Trash', SET read = TRUE;
Purges emails exceeding spam thresholds or carrying hazardous binary attachments directly into Trash.
Secure HMAC Webhook Dispatcher
WHEN subject LIKE '%Deploy Alert%' THEN EXECUTE WEBHOOK 'https://api.kof22.com/webhooks/deploy';
Dispatches an authenticated HMAC-SHA256 webhook notification to an external endpoint upon receiving deployment alerts.