• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

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