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!

Auto deleting emails older than a month

Discussion in 'E-mail Discussion' started by Beelady11, Aug 20, 2015.

  1. Beelady11

    Beelady11 Registered

    Aug 20, 2015
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Reseller Owner
    I'm fairly new to this so please forgive my lack of knowledge.

    I have a few websites on Hostgator and I would like to know how to automatically delete emails (from inbox and sent folders) that are, say, older than a month.
    I've read a few threads on here related to this but they mention things like 'cron jobs' which I've never heard of.

    Does anyone have any simple suggestions, please? Or a link to something I can follow?

    Thanks very much in advance :)
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    Are you using Webmail or IMAP to manage your emails, or do you download your emails with POP3 in an email client? There are no native features that will allow you to automatically delete emails from your Inbox and Sent folders, so you would have to develop a script or setup a cron job to remove the emails directly from your /home/$username/mail/$ directory (and .Sent). Cron jobs are documented at:

    cPanel - Cron Jobs

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

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