Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Possible to auto delete old emails after x number of days?

Discussion in 'E-mail Discussion' started by osmium489, Apr 3, 2014.

  1. osmium489

    osmium489 Registered

    Joined:
    Apr 3, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I would like to be able to automatically delete anything from my inbox that's older than 30 days. I was trying this as a Cron job but haven't gotten it to work, the info in the curly braces is where I put my email info in:

    /usr/bin/archivemail --quiet --delete --days 30 /home/{mycpanelusername}/mail/{mydomain.com}/{myemailname}/inbox

    Is something wrong with this or is there a better way to go about this?
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    28
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Yes, the thread referenced in the previous post should help you to setup a cron job to remove emails at a set time period. In particular, this post:

    Cron Job To Remove Emails

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice