The following guide shows you how to get rid of spam emails in your cPanel:
Open your email client or webmail to get your email header
Email Customer
After getting the email you may need to check the source "Return-Path" referring to the instructions below to see the email client header.
The example below is a spam email coming from msc8286@gmail.com therefore it may be necessary to delete the email.
Webmail
After getting the email header (Roundcube, Horde or Squirrelmail) you can check the source "Return-Path".
After that, login to your cPanel by accessing the URL: http://cpanel.domainname/ or http://domainname:2083/ and click on "Filter Leveling" or "User Level Filtering" on your cPanel main screen.
In the "From" and "Contains" Rules or Create a "Rule" that you want to discard email spam.
In this step you need to enter the spam mail "Return-Path" like the example above in the spam email header section is msc8286@gmail.com and click "Create".
Notes: Account filtering means the same as user-level filtering, with the difference that the filters created here are applied globally to the entire cPanel account.