automatic deletion of emails with cron

birken

Member
Oct 28, 2013
7
0
1
cPanel Access Level
Reseller Owner
Hi guys,

i am using this cron job to delete old mails automatic on Horde.

find /home/SERVER_LOGIN_USERNAME/mail/DOMAIN_NAME/MAIL_ACCOUNT_NAME/cur -type f -mtime +30 -exec rm {} \;

what i wonder what to change in the code above if i want to delete mails that is older than 6 month?

warm regards Birken
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello,

The mtime value of "30" in that command represents the number of days. You could update the value from "30" to "180" days.

Thank you.