1834211 Members
2222 Online
110066 Solutions
New Discussion

Mail files

 
SOLVED
Go to solution
Ali Imran Abbas
Regular Advisor

Mail files

I am just doing a routine cleanup on my systems and I found big mail files under var/mail directory specially for root and oracle users. I have a questios in this regard, do we need these files for reference or periodically trim them? What is the procedure to trim or delete these files.
4 REPLIES 4
Rasheed Tamton
Honored Contributor
Solution

Re: Mail files

This is mail folder. /var/mail/root is root's mail and sometimes errors are reported in the file. The same for oracle.

If you routinely monitor your system and read the log files (syslog, etc) and oracle logs you can empty the files as below (or you can make a copy somewhere/compress it and keep it - if you want before emptying the files):

cd /var/mail
cat /dev/null >root
or
> root
> oracle
After it the file size would be zero.
TTr
Honored Contributor

Re: Mail files

You should check root's email by using "elm" before you delete the mail file. If the mail file is too big and elm can not open it or it takes too long, you can look at the file itself with "more /var/mail/root". The same with /var/mail/oracle. You can open it as a mail file with elb by using "elm -f /var/mail/oracle" or login as oracle and run elm.

If these files are really huge, check if /tmp has enough space to hold a copy of each file. The elm reader makes a copy of the mail file in /tmp.
Hein van den Heuvel
Honored Contributor

Re: Mail files

I would never just 'blow thme away'.
zip/compress them away onto backup storage before doing so. They compress nicely.

fwiw,
Hein.
James R. Ferguson
Acclaimed Contributor

Re: Mail files

Hi:

You have additional answers here:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1247517

Regards!

...JRF...