The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> Linux Help
|
Root mail huge
Discuss Root mail huge in the Linux Help forum on Dev Shed. Root mail huge Linux Help forum discussing topics including usage, troubleshooting, modules, and distributions. Linux is an open source OS, based on UNIX.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 4th, 2011, 12:39 AM
|
|
|
|
Root mail huge
In doing some disk cleanup on CentOS, I just found that my /root/Maildir/new directory was 25G.
Does anyone have advise on how to stop this from re-occurring?
|

February 4th, 2011, 09:09 AM
|
|
|
Yes, housekeeping!
The user running cron jobs, etc., will get mailed when there is output from the job that would normally go to stdout or stderr. You may well have one or more cron jobs that regularly produces output which will send mails - backups are a prime example.
__________________
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
|

February 4th, 2011, 02:01 PM
|
|
|
Quote: | Originally Posted by SimonJM Yes, housekeeping!
The user running cron jobs, etc., will get mailed when there is output from the job that would normally go to stdout or stderr. You may well have one or more cron jobs that regularly produces output which will send mails - backups are a prime example. |
Whats the best way to defeat this? Send the cron output to /dev/null ?
|

February 4th, 2011, 04:29 PM
|
|
|
Not immediately!
What you do is have a trawl through the mails, identify the 'regular offenders' and why they are doing it. If it's 'just' log information of no use then redirect that output to either a fixed file (for each task) so they can be reviewed on a daily basis, or to /dev/null.
If the information is needed, then redirect the output to a file that will either be appened to or contain the run date/time, so that can be reviewed.
Log files will, of course, tale up space so if you redirect all the putput to log files you'll just be moving the problem from one file system/directory to another.
That's why you go through the mails (probaly only really need the last months) to get a decent representation of what is being output and why and then deal with that. Then you keep an eye on the mail root files and perform the above steps for any more output previously missed.
Rinse and repeat. Wax on, wax off ... 
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|