Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

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. ?
0
928
Asked:
928
1 Solution
 
ahoffmannCommented:
add following in roots crontab:

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now