type.inbound
and any(body.current_thread.links,
.href_url.domain.root_domain == "soundestlink.com"
and not strings.istarts_with(.href_url.path, '/contactsPreferences/')
)
and length(distinct(filter(body.current_thread.links,
.href_url.domain.root_domain == "soundestlink.com"
and not strings.istarts_with(.href_url.path,
'/contactsPreferences/'
)
),
.href_url.url
)
) == 1
and not any(headers.hops, any(.fields, .name =~ "List-Unsubscribe"))
and not (
any(html.xpath(body.html, '//a').nodes, .inner_text =~ "Edit Preferences")
and any(html.xpath(body.html, '//a').nodes, .inner_text =~ "Unsubscribe")
)
Playground
Test against your own EMLs or sample data.