[ale] clearing out root's mail

Jeff Lightner jlightner at water.com
Wed Jan 6 13:23:21 EST 2010


Run "lsof /var/spool/mail/root" and see what is using this file. 
Stop the application(s) indicated by lsof.
Do "> var/spool/mail/root" to overwrite the file to be empty.
Restart the application(s) stopped in 2nd step.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of William Fragakis
Sent: Wednesday, January 06, 2010 1:12 PM
To: Atlanta Linux Enthusiasts - Yes!We run Linux!
Subject: Re: [ale] clearing out root's mail

On Wed, 2010-01-06 at 12:21 -0500, Björn Gustafsson wrote:
> It's unlikely that sendmail would resize the new file unless it was
> *constantly* streaming messages into root's mailbox.  Even then it
> would be strange, since it would have to be ignoring the file's actual
> size when it seeks to the end.
> 
> When you say it "rebuilds", do the old messages also reappear?  
Yes. As fond as I was of 2008, there are some things I'd like to leave
behind.
> Is
> there any chance you're using a different MTA that does something
> special like keeping two hard links to the mailbox file?  That's kind
> of what it sounds like to me.  If you do `ls -l' on the file, does it
> have more than one hard link?  Or maybe it's a symlink?  I'm not
> familiar with CentOS any more, so it may do something unusual like
> that.
does this help?

# ls -l /var/spool/mail/root
-rw------- 1 root root 64662366 Jan  6 09:59 /var/spool/mail/root

thanks,
William

> 
> On Wed, Jan 6, 2010 at 10:28 AM, William Fragakis <william at fragakis.com> wrote:
> > I'm running Centos 5.4. Root's mail file has grown to a cumbersome size.
> > I'd like to clear it out but if I follow the advice I've been able to
> > googe and dum/delete/create new  the file (/var/spool/mail/root),
> > sendmail rebuilds it to the original size.  Is there a step I'm missing?
> >
> > thanks,
> > William
> 

_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
 
Proud partner. Susan G. Komen for the Cure.
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------



More information about the Ale mailing list