I first set up the custom scoring for unwanted domains/TLDs in the spamassassin global configuration, by adding these rules to the end of that file. `/etc/mail/spamassassin/local.cf` ``` enlist_uri_host (NEWSPAMMY) top enlist_uri_host (NEWSPAMMY) pro enlist_uri_host (NEWSPAMMY) xyz enlist_uri_host (NEWSPAMMY) download header PDS_OTHER_BAD_TLD eval:check_uri_host_listed('NEWSPAMMY') score PDS_OTHER_BAD_TLD 40.0 describe PDS_OTHER_BAD_TLD Other untrustworthy TLDs ``` Once the rules are in place you need to either restart either `spamd` or `exim`. Restarting `exim` will restart the `spamd` and `clamd` services as part of restarting exim. Then I started in on setting up the filters to delete the mail as it comes in. First you need to tell exim how to save files when you call the save command in the filter later. Add the following line to the `/etc/exim.conf.local` under the `@CONFIG@` section ``` system_filter_file_transport = address_file ``` Then Rebuild the exim configuration `/scripts/buildeximconf` Next create system filter file with the following contents `/usr/local/cpanel/etc/exim/sysfilter/options/delete_after_score_40` ``` # Exim filter if $h_X-Spam-Bar: contains "++++++++++++++++++++++++++++++++++++++++" then save "/dev/null" 660 endif ``` Finally, under WHM > Service Configuration > Exim Configuration Manager > Filters enable the new filter. This will restart exim again to make this filter active.