- CentOS 7.6
- Exim 4.91-5
What I am looking to achieve
Using Exim I want to silently discard incoming emails from a user set list of wildcard matches. SpamAssassin and other tools are not suitable in this instance.
I want to block any emails coming from a domain ending in
My edit methodology
My system has an Exim list of additional custom filter rules in a folder;
My file in that folder stands as:
#block email domains if ( $h_from: matches ".*@.*\.opskee\.gq\$" or $h_from: matches ".*@.*\.icu\$" ) #then noerror seen finish then deliver "SpamTest <[email protected]>" seen finish endif
Intention of the above PCRE:
To block any email whose from domain ends in
I tried testing the system using the reference in the other question but this just hung the SSH.
/usr/sbin/exim -bF <scriptfile> -f <sender>
- Is my above PCRE correct (or at least, avoids obvious exim-specific erorrs)?
- Can a full complete example be provided/linked for the
<sender>command in the above prompt?
- Some documentation (3rd party) referencing brackets around the
ifstatement (I currently have this) and others do not; which is better?