Auto deleting emails older than a month

Beelady11

Registered
Aug 20, 2015
1
0
1
UK
cPanel Access Level
Reseller Owner
Hi.
I'm fairly new to this so please forgive my lack of knowledge.

I have a few websites on Hostgator and I would like to know how to automatically delete emails (from inbox and sent folders) that are, say, older than a month.
I've read a few threads on here related to this but they mention things like 'cron jobs' which I've never heard of.

Does anyone have any simple suggestions, please? Or a link to something I can follow?

Thanks very much in advance :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,917
2,248
363
Hello :)

Are you using Webmail or IMAP to manage your emails, or do you download your emails with POP3 in an email client? There are no native features that will allow you to automatically delete emails from your Inbox and Sent folders, so you would have to develop a script or setup a cron job to remove the emails directly from your /home/$username/mail/$domain.com/user/cur directory (and .Sent). Cron jobs are documented at:

cPanel - Cron Jobs

Thank you.