type.inbound
// mention this in the rule name: subject is just the senders domain sld
and subject.base =~ sender.email.domain.sld
and (
// self sender or invaild recipent domain or local parts match
(
length(recipients.to) == 1
and (
sender.email.email == recipients.to[0].email.email
or recipients.to[0].email.domain.valid == false
or sender.email.local_part == recipients.to[0].email.local_part
)
)
// no recipients defined
or (
(
length(recipients.to) == 0
or all(recipients.to, .email.domain.valid == false)
)
and length(recipients.cc) == 0
and length(recipients.bcc) == 0
)
)
and any(body.current_thread.links,
.href_url.domain.root_domain in $free_file_hosts
or .href_url.domain.root_domain in $free_subdomain_hosts
)
Playground
Test against your own EMLs or sample data.