We will create a new multimap to selectively block specific senders using the mail envelope. Our rule will filter based on the right hand side only – matching the domain part of the envelope email:domain
. In addition we will use the prefilter
attribute with action = "reject";
to avoid subsequent costly tests – reject will be the treated as ultimate decision for this mail.
Alternatively we can also filter on the full e-mail address email:addr
.
sender_envfrom_deny { description = "Sender envelope from deny list"; type = "from";filter = "email:domain"; map = "$LOCAL_CONFDIR/local.d/maps.d/sender_envfrom_deny.map.local"; symbol = "SENDER_ENVFROM_DENY";prefilter = true; action = "reject"; }
example-domain1.com info.example-domain2.com