type.inbound
and any(attachments,
.file_extension == "mobileconfig"
and any(regex.iextract(file.parse_text(.).text,
'<string>\s*(?P<email>[^\s]+@[^\s]+)\s*[^\<]+\</string>'
),
strings.parse_email(.named_groups["email"]).domain.root_domain != sender.email.domain.root_domain
and strings.parse_email(.named_groups["email"]).email not in map(recipients.to,
.email.email
)
and strings.parse_email(.named_groups["email"]).email not in $recipient_emails
and strings.parse_email(.named_groups["email"]).email not in $sender_emails
)
)
Playground
Test against your own EMLs or sample data.