type.inbound
and any(attachments,
(
.content_type == "text/html"
or .file_extension in~ ("html", "htm", "shtml", "dhtml")
or .file_type == "html"
)
and any(file.explode(.), any(.scan.yara.matches, .name == "HTML_EXCESSIVE_PADDING"))
)
Playground
Test against your own EMLs or sample data.