type.inbound
// X-Source-Auth doesn't match sender
and any(headers.hops,
any(.fields,
.name == 'X-Source-Auth'
and .value != sender.email.email
and strings.parse_email(.value).email is not null
)
)
// mismatched sender (from) and Reply-to
and length(headers.reply_to) > 0
and all(headers.reply_to,
.email.domain.root_domain != sender.email.domain.root_domain
)
and length(ml.nlu_classifier(body.current_thread.text).intents) > 0
and not any(ml.nlu_classifier(body.current_thread.text).intents,
.name == 'benign' and .confidence != 'low'
)
Playground
Test against your own EMLs or sample data.