Messages to be automatically deleted after some days

Any idea on how messages can be automatically deleted after some days.

Will be useful to save some space in database especially when there is a high rate of messages flying around in one's site