Log in to cPanel using your username and your cPanel password at http://yourdomain.com/cpanel,
where yourdomain.com is your domain name.
Click on Global Email Filters to filter email for all domains hosted in your cPanel account.
If you want to apply filter for 1 domain you can use "Email Filters" Option.
In my case i want to Filter Email for all my hosted domains so i clicked on Global Email Filters.
After reached in Global Email Filters Menu you have to click on Create a New Filter button as showing in example below.
Now as per steps guided below you can add your own keywords or Rules according to your need.
In 1st example i have filtered rules "Email Subject" which contains word "Spam".
In 2nd example i have filtered rules "Email Body" which contains word "Bank account".
In 3rd and 4th example i have filtered rules "Email Body" which contains word "hack & bitcoin".
In action you can choose the applied action you want to perform if these conditions are meet your specified rules.
In my case i have choose Action > Deliver to folder and select Browse button and linked my junk folder.
You can also select some other options according to your requirements.
And click create.
In other example i have just select my Action as Discard Message because of disk space issue.
So as long these conditions are meet your specified rules, email will be automatically deleted and you will not even see these emails.
After click create and navigate to Global Email Filters you can test your email by mention your required keywords in subject or body.
In other example you can have some other options where you can specify a whitelist or blacklist email address and domains.
After login in cPanel scroll down to Email Section and click on Spam Filters.
Enable this option if you want to delete automatically email that meets or exceeds the spam score. E.g. Mis configured SPF/DKIM
records.
In Blacklist email address click on edit blacklist email setting button.
Here you can block whole domain name or a specfic email address.
As per 1st example you can see i have added 1 email address, other all emails associated with this domain can still send email.
In 2nd example i have filtered whole domain name, which means any email address associated with this domain name now unable to
send email and is blacklisted in cPanel configuration.