This works well: http://freshmeat.net/projects/swendeleter/?topic_id=29 To use in cron, I commented out the line: say "$nmails left in the mailbox"; So I only get cron email if it deleted anything.