type.inbound
and any(body.links,
.href_url.domain.root_domain == "diesel.az"
and strings.istarts_with(.href_url.path, '/az/redirect')
and length(.href_url.query_params_decoded["url"]) > 0
// redirect is not going back to diesel.az
and not any(.href_url.query_params_decoded["url"],
strings.parse_url(.).domain.root_domain == "diesel.az"
)
)
and not (
sender.email.domain.root_domain == "diesel.az"
and coalesce(headers.auth_summary.dmarc.pass, false)
)
Playground
Test against your own EMLs or sample data.