root mail file filling fast (solaris 2.x)

the local root mail file fills rapidly with informational messages from scripts and monitoring products. I need to automatically ( Once every 24hrs. ) go thru the file and delete emails that are more than 24hrs. old. I do need to keep emails within 24hr. period. ?
928Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ahoffmannConnect With a Mentor Commented:
add following in roots crontab:

59 23 * * * mv /var/spool/mail/root{,`.date +%d%m%y`}
0
All Courses

From novice to tech pro — start learning today.