type.inbound
and length(attachments) == 0
// SenderTeam's tracking-link format on the sender's own domain
// /tr/click?uid=<base58>&type=c&sid=<n>
and any(body.current_thread.links,
.href_url.domain.root_domain == sender.email.domain.root_domain
and regex.imatch(.href_url.path, '/tr/(?:click|unsubscribe|bclick)')
and any(.href_url.query_params_decoded["uid"],
regex.match(., '[1-9A-HJ-NP-Za-km-z]+')
)
and any(.href_url.query_params_decoded["sid"],
regex.imatch(., '[0-9]+')
)
and any(.href_url.query_params_decoded["type"], . in ("c", "u", "b"))
)
Playground
Test against your own EMLs or sample data.