Script to Delete Old Messages in Mailbox

hci

Verified User
Joined
Jun 15, 2004
Messages
355
I have several mailboxes that just fill up with junk. Does anyone know of a script or something that I can run with a cronjob to delete all messages over a month old? I do not want to delete the accounts totally since I use them to determine how well the spam filter works.

Matthew
 
Any local client can be set to "leave email on server" and to "delete email over xx days old".

Otherwise since DA uses mbox format for emails you'll need to find a script that can grep out entire emails from a single file.

Or perhaps write a perl or php script to actually use POP3 to do the deletes.

No, I don't know of one.

Jeff
 
Back
Top