cPanel & WHM Version 114 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Auto-delete Spam Box emails older than x days.

electric shared this idea 6 years ago
Open Discussion

As a server administrator I would like cPanel to allow me to define an auto-deletion of Spam from a users's Spam Box to prevent unnecessary disk space being taken up by users who fail to empty their Spam Box regularly.

This feature request would add a setting in WHM "Tweak Settings" where an admin can specify the desired time limit for any emails in the Spam Box. For example:


Delete emails in Spam Box older than [ x ] days. (Default to 90 days.)


Replies (1)


To show a list of all .spam foldersand their disk usage, here is the command:

  1. find /home/*/mail -type d -name '.spam' -exec du -sh {} \;

If anyone wants a little more background on this feature request, here's the original forum thread that prompted the request.


Leave a Comment
Attach a file