Here is the shell command for removing all the spam-boxesfind /home/username/mail/ -name *spam* -exec rm '{}' \; -print
Note the orange text indicating where you would put your admin user name. This clears all the spam-boxes (spam files that Spam Box generates to hold all the spam as determined by SpamAssassin… if you have used CPanel a couple of times, you’ll know what all this means).
Ideally you would want to create a cron-job for this. In the CPanel menu area select the icon “Cron jobs” (Cron job is a daemon that runs all the time on your server. It can carry a host of tasks and each task has a date and time of execution. It just runs on your server and waits for those execution times. Once it reaches that time it executes the task associated with it.).
Once in the Cron jobs section choose the ‘standard’ way of creating a cron job. Enter the shell script above with the correct changes for your server (*note, it’s a good idea to test-out the shell script without the -exec rm ‘{}’ \; -print in a controlled environment, to make sure it works), select when you would like the script to run… everyday, once-a-week, whatever meets your needs. Click ‘Save Crontab’ and you’re done.