Deleting mail older than n days


I've published SQL code that can be used for this task here.

Original Request

Currently, the dbmail-users utility can be used with the -e flag to empty a user's mailbox. It would be nice if the utility was extended to accept something like ”-o” which, when used with -e, would remove messages older than the value passed to -o.

For example:

dbmail-users -e -o 30 foo 

would remove messages in foo's mailbox older than 30 days.

This would be useful as a maintenance approach (cron job) in order to deal with “business generic” accounts and system mail (e.g. monitoring and alerting) that tend to get overlooked.

delete_old_mail.txt · Last modified: 2012/02/27 21:50 by bas
DBMail is developed by Paul J Stevens together with developers world-wide