sylvest Posted April 5, 2007 Posted April 5, 2007 I desperately need a script or other way of deleting e-mails from a mailbox on the server depending on their date. This is because I want to filter my incoming mail for spam on the server. I don't want to download all spam to my local PC because I don't want to use the bandwidth or the local storage space, but I do want the ability to check the recent spam using Webmail if someone tells me that they sent me mail which never arrives. So I'd like to automatically delete all messages from the spam folder that's older than say 30 days. There seems to be no built in facility allowing me to do this. Is there a way of using a script to do it, maybe run automatically every day? How do I access messages in my mail folder from a script? Can I manipulate messages (e.g. copy them, move them, delete them)? How? Many thanks for your help. Rowan Quote
TCH-Bruce Posted April 5, 2007 Posted April 5, 2007 In cPanel go into manage accounts. Select the Aging feature for the account and specify the number of days you wish to keep emails. Quote
sylvest Posted April 5, 2007 Author Posted April 5, 2007 In cPanel go into manage accounts. Select the Aging feature for the account and specify the number of days you wish to keep emails. Thanks for your reply. Aging only seems to be triggered by a POP3 session on the account. I don't want to pick up this spam via POP3 - I want to leave it on the server, so I can access it via WebMail if I need to. Is there some way of triggering the aging function without doing a POP3 session? Thanks - Rowan Quote
TCH-Andy Posted April 6, 2007 Posted April 6, 2007 If you want to do it via a cron - you could have a look at Cron jon to purge old emails Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.