type.inbound
and any(attachments,
(
.file_extension in~ ("svg") or
.file_extension in~ $file_extensions_common_archives
)
and any(file.explode(.),
.file_extension in~ ("svg") and
any(.scan.xml.tags, . == "script")
)
)
and (
not profile.by_sender_email().solicited
or sender.email.domain.domain == "delivrto.me"
)
Playground
Test against your own EMLs or sample data.