type.inbound
and any(body.links,
// Look for Obunsha passnavi URLs
.href_url.domain.domain == "passnavi.obunsha.co.jp"
and strings.icontains(.href_url.path, '/ct.html')
and strings.icontains(.href_url.query_params, 'uri=')
// Make sure it's not redirecting back to obunsha domains
and not regex.icontains(.href_url.query_params,
'uri=(?:https?(?:%3a|:))?(?:%2f|\/){2}[^&]*obunsha\.co\.jp(?:\&|\/|$|%2f)'
)
)
// Exclude legitimate Obunsha domains as senders
and not sender.email.domain.root_domain == "obunsha.co.jp"
// negate highly trusted sender domains unless they fail DMARC authentication
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.