• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Script to delete old mails

M

Mr.Yes

Guest
Hi,

i daily run a bash script to delete mails older then 90 days on our machines , but today i discovered that this code wrongly do not delete for example emails dated 01-25-2005, 01-27-2005 why?? is any good programmer can help me on this?


PHP:
#!/bin/bash

# clean mailnames msg older then 90 days from now

find /var/qmail/mailnames/*/*/Maildir/cur/ -type f -ctime +90 -exec rm -f '{}' \;
find /var/qmail/mailnames/*/*/Maildir/new/ -type f -ctime +90 -exec rm -f '{}' \;


thanx
 
sorry i don't understand your post, please, can u write more expilicit? :)
 
Back
Top