type.inbound
and sender.email.email == ""
and (
strings.icontains(sender.display_name, "mailer-daemon")
or strings.icontains(sender.display_name, "postmaster")
)
and not (
(
any(ml.nlu_classifier(body.current_thread.text).topics,
.name == "Bounce Back and Delivery Failure Notifications"
and .confidence == "high"
)
or regex.icontains(subject.subject, 'Undeliver(?:ed|able)')
or regex.icontains(subject.subject, 'Mensagem não entregue') // portuguese bounce back variant
or regex.icontains(subject.subject, '系统退信') // chinese bounce back variant
)
)
Playground
Test against your own EMLs or sample data.