Stop SPAM from reaching any mail boxes on my VPS servers?

Hi,
I am trying to stop SPAM from reaching any mail boxes on my VPS servers via some word or phrase filters in WHM/cPanel

I have made a copy of /etc/cpanel_exim_system_filter to /etc/cpanel_exim_system_filter and will point to this new file.
But how do I modify it so check for specific words or phrases and auto delete the emails.

For example to check for and delete any emails that contain the following in body text?
"Hello & Good Day"
"SEO Services Company"
"Top Rankings In Google"
"IT Company from India"
"I have reached out to you"

I have found link below but can't see how to add word filters?

Thanks


https://forums.cpanel.net/threads/need-to-filter-all-email.348741/
sabecsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lucas BishopClick TrackerCommented:
You'll want to setup rules for "$message_body" since all of those examples you used will likely be at the very beginning of the message.

An example would look something like this:
if
    $message_body contains "Hello & Good Day"

then
    fail text "This message has been rejected because it\n\
             looks like you are spamming us."
  endif

Open in new window


Here is a more robust example.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sabecsAuthor Commented:
Thanks Lucas, that is perfect.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.