Hello guys. Today I have this scenario: two large customers have hundred of email accounts which are being forwarded to those users' personal Gmail/Yahoo/Hotmail accounts. The physical email account at cPanel is needed because they have to reply using the account's SMTP. Due to this, their webmails are rapidly filling their quota with emails, so that the IT guy (me) has to empty those emails accounts manually 
My question is: what bash command should I run to have this task automated via cronjob?
I bet this can be cleanly performed by running a weekly cronjob emptying all those accounts.
The idea would be to delete this:
rm -rf /home/username/mail/domainname.com/user1/cur/*
rm -rf /home/username/mail/domainname.com/user2/cur/*
rm -rf /home/username/mail/domainname.com/user3/cur/*
....
rm -rf /home/username/mail/domainname.com/user56/cur/*
So, can I simply put those commands in a .sh file to be called via cronjob weekly? or should I take anything else in account to avoid anything that could crash those accounts?
I come doing this manually since a couple weeks and nothing has been broken.
Best regards
My question is: what bash command should I run to have this task automated via cronjob?
I bet this can be cleanly performed by running a weekly cronjob emptying all those accounts.
The idea would be to delete this:
rm -rf /home/username/mail/domainname.com/user1/cur/*
rm -rf /home/username/mail/domainname.com/user2/cur/*
rm -rf /home/username/mail/domainname.com/user3/cur/*
....
rm -rf /home/username/mail/domainname.com/user56/cur/*
So, can I simply put those commands in a .sh file to be called via cronjob weekly? or should I take anything else in account to avoid anything that could crash those accounts?
I come doing this manually since a couple weeks and nothing has been broken.
Best regards