• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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