Possible to auto delete old emails after x number of days?

osmium489

Registered
Apr 3, 2014
1
0
1
cPanel Access Level
Website Owner
I would like to be able to automatically delete anything from my inbox that's older than 30 days. I was trying this as a Cron job but haven't gotten it to work, the info in the curly braces is where I put my email info in:

/usr/bin/archivemail --quiet --delete --days 30 /home/{mycpanelusername}/mail/{mydomain.com}/{myemailname}/inbox

Is something wrong with this or is there a better way to go about this?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello :)

Yes, the thread referenced in the previous post should help you to setup a cron job to remove emails at a set time period. In particular, this post:

Cron Job To Remove Emails

Thank you.