Automatically Delete New Spam (Auto-Delete)

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello @sahostking,

There's no global option that will let you turn that feature on for all existing accounts or to turn it on by default for new accounts. I encourage you to open a feature request if this is something you'd like to see added to the product:

Submit A Feature Request

In the meantime, if you're looking for a way to do this via the command line, then you may find the following UAPI function helpful:

UAPI Functions - Email::add_spam_filter - Developer Documentation - cPanel Documentation

You could develop a script that runs this function for all existing accounts on the server, and/or setup that custom script to run as part of the post Accounts::Create hook event:

Guide to Standardized Hooks - Developer Documentation - cPanel Documentation
Guide to Standardized Hooks - Whostmgr Functions - Developer Documentation - cPanel Documentation

Thank you.