The only way to properly reject a message at SMTP time would be to do it within the exim.conf file.
You would need to do this in the
acl_smtp_data section before the final accept. For information on header expansion in the conf file see:
Exim is a message transfer agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet.
www.exim.org
Scroll down to the section that starts with
$header_<header name>: or $h_<header name>
To actually make this kosher with cPanel, you would have to add the code into the proper
/usr/local/cpanel/etc/exim/acls and enable that customization file in
/etc/exim.conf.localopts ... easiest way is to use the Exim Configuration builder in WHM and note what files change in these directories/file after you make the changes.
If you are using a filter to do all of this - then you can place the filter context in
/etc/cpanel_exim_system_filter or whatever file
system_filter is pointing to in the exim.conf file.
The key here is that you can't reject mail in a filter (well... I mean... I guess you can, but your server is then going to be responsible for sending the bounce message). The filter doesn't run until after you have accepted the message. But you can blackhole it or send it to
/dev/null. Doesn't give necessarily the same effect, but it at least keeps messages from being delivered.
There's probably a more kosher way of doing this in cPanel that involves modifying some files again in the
/usr/local/cpanel/etc/exim directory. Perhaps creating a file in
/usr/local/cpanel/etc/exim/sysfilter/options with the code and running
/scripts/buildeximconf ? Really not sure with this, never used this. You would also need to restart exim after
/scripts/buildeximconf because it doesn't restart exim.