1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Script to delete old mails

Discussion in 'Plesk for Linux - 8.x and Older' started by Mr.Yes, Jan 23, 2007.

  1. Mr.Yes

    Mr.Yes Guest

    0
     
    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 -'{}' \;
    find /var/qmail/mailnames/*/*/Maildir/new/ -type f -ctime +90 -exec rm -'{}' \;

    thanx
     
  2. maroc

    maroc Guest

    0
     
    exiqgrep -i -o Xseconds | xargs exim -Mrm

    ???
     
  3. Mr.Yes

    Mr.Yes Guest

    0
     
    sorry i don't understand your post, please, can u write more expilicit? :)
     
  4. maroc

    maroc Guest

    0
     
Loading...