Hello,
I was able to successfully block outgoing emails from the domain in question using the following steps:
Firstly, I created the file /usr/local/cpanel/etc/exim/sysfilter/options/test (name it whatever you want, just must be in that folder). This had the following contents:
if $header_from: contains "@domain"
then
fail text "Connection rejected: SPAM source $domain is automatically blacklisted from sending mail."
seen finish
endif
if $header_from: contains "username@server-hostname"
then
fail text "Connection rejected: SPAM source username@server-hostname is automatically blacklisted from sending mail."
seen finish
endif
Note that I also included username@server-hostname so that it also filters php mail() items.
Afterwards, I went to the Exim Configuration Manager, and simply hit save. No actual action needs doing, just the Exim configuration needs to know about this.
I tested this with a two-way message to and from our testing Gmail account. The results were as you requested.
This filter has syntax documented at <
3. Exim filter files >.