type.inbound
and (
strings.icontains(body.current_thread.text, "btc", "bitcoin")
or regex.icontains(body.current_thread.text, 'pass[\s-]?word')
)
and 2 of (
strings.icontains(body.current_thread.text, "portfolio"),
strings.icontains(body.current_thread.text, "confirm your balance"),
strings.icontains(body.current_thread.text, "web portal"),
strings.icontains(body.current_thread.text, "customer id"),
strings.icontains(body.current_thread.text, "login to confirm")
)
and any(ml.nlu_classifier(body.current_thread.text).intents,
.name in ("cred_theft", "advance_fee", "bec")
)
// 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)
)
Playground
Test against your own EMLs or sample data.