The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

automatic deletion of emails with cron

Discussion in 'E-mail Discussions' started by birken, Feb 13, 2017.

  1. birken

    birken Member

    Joined:
    Oct 28, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Hi guys,

    i am using this cron job to delete old mails automatic on Horde.

    find /home/SERVER_LOGIN_USERNAME/mail/DOMAIN_NAME/MAIL_ACCOUNT_NAME/cur -type f -mtime +30 -exec rm {} \;

    what i wonder what to change in the code above if i want to delete mails that is older than 6 month?

    warm regards Birken
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,094
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The mtime value of "30" in that command represents the number of days. You could update the value from "30" to "180" days.

    Thank you.
     
Loading...

Share This Page