type.inbound
and any(ml.nlu_classifier(body.current_thread.text).entities,
.name in ("org", "sender")
and regex.contains(.text, '\b(?:AAA|RAC|RAA|CAA|BCAA|AMA)\b')
)
and regex.icontains(body.current_thread.text,
'(?:car|vehicle|motor|driver|emergency|road.?side|break.?down|assist|save|discount|complimentary|free\b).{0,10}kit'
)
// and the sender is not from high trust sender root domains
and not (
sender.email.domain.root_domain in $high_trust_sender_root_domains
and coalesce(headers.auth_summary.dmarc.pass, false)
)
// negate newsletters and quarantine notifications
and not (
any(ml.nlu_classifier(body.current_thread.text).topics,
.name in ("Newsletters and Digests") and .confidence != "low"
)
or strings.icontains(subject.subject, "quarantine")
)
Playground
Test against your own EMLs or sample data.