/var/spool/mail/<username> files' content wipeout impact


 
Thread Tools Search this Thread
Operating Systems AIX /var/spool/mail/<username> files' content wipeout impact
# 1  
Old 06-19-2014
/var/spool/mail/<username> files' content wipeout impact

Hi Guys!!!

->I am using AIX 6.1. One of the file system full which is /var filesystem.
->/var total size is 5.00 GB.
->And inside the /var file system spool/mail folde is taking around 2.9 GB.
->There 3 big size of file as shown below, which shows that these files are taking more size.
-rw-rw---- 1 XXXX mail 34038198 Jun 19 17:00 XXXX
-rw-rw---- 1 root mail 2035034669 Jun 19 17:05 root
-rw-rw---- 1 oracle mail 906850628 Jun 19 17:05 oracle

->I checked on the internet and noticed that we can these files empty.
->Please advice if I'll make these 3 files to zero.
->before making these 3 files to zero, how can I know these files having critical taxt or not.
->Actually, I am scaring Smilieif I will wipeout its content then how much it it will either critical or no impact.

-> Kindly advice.
# 2  
Old 06-19-2014
Have a read of the manual pages for the mail command. Whilst you can just remove the files, these are likely diagnostic messages that you should read.

If you have cron jobs and they create output or errors that would go to the screen, these are mailed to the id running the command. Other things that might go are automated diagnostics, hardware alerts, full disk alerts etc.

Sign on as the id owning the mailbox and run the command mail with no parameters to read the mail.

2Gb of text only email for root is a lot. You need to find out why you are getting it. Similarly, oracle having 900Mb is vast, so something it wrong.



Robin
# 3  
Old 06-19-2014
My two cents with rbattel, those are unread messages, figure out why it is generating it, by logging in as that user and running mail (as mentioned by rbattel).

Also, check your cron, see if you are missing > /dev/null 2>&1 for jobs.

Also check if you have the correct smtp server name in /etc/sendmail.cf file
Code:
cat /etc/sendmail.cf | grep DS
Does it show you, your local smtp server name?

If it does not then add the server name and restart the sendmail service.
Code:
lssrc -s sendmail, if its not then start it
startsrc -s sendmail -a "-bd -q30"

These 2 Users Gave Thanks to ibmtech For This Post:
# 4  
Old 06-19-2014
Just adding > /dev/null 2>&1 to cron job definitions doesn't mean that an actual problem is fixed, (if there is one) but you may stop further messages.

I forgot that failed sending to external email will generate failure return reports for the sender.

What do you see in the mail for these users? Can you paste (in CODE tags) a sample?


Robin
# 5  
Old 06-20-2014
Amen to what ibmtech and rbatte1 said, they are correct.

In principle it is the duty of the admin to read such messages. Having said this: reading several GB of text messages might take you longer than your active job life and i bet the first of these messages are from a time computers ran on steadm, not on electric power.

Therefore i suggest you: delete the mail file for "XXXX". This is an ordinary user and he should have checked his mail when he had the opportunity. This gives you some free space back.

Second, log on as root and open the mail. Delete all messages save for the last 100 or so and read these. Perhaps there is a pattern to them and what you have deleted is either outdated or repetition of this pattern anyway.

Do the same for the Oracle user. See the man page of "mail" on how to delete a range of messages. It will tell you how many messages there are in the inbox, so you can calculate how many you can delete. Note that they are sorted chronologically with the newest messages holding the highest numbers.

From now on you should read the mails to root and other system users daily. Either these messages are important and will help you better administer the system OR they are superfluous and you should switch their generation off at the source.

On a second thought: if you do not check the mail regularly you probably do not trim /var/adm/wtmp either. You might have a look at it and maybe trim it. DO NOT delete it! "zap" the file:

Code:
cat /dev/null > /var/adm/wtmp


I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

/var/spool/mail/ issues

Hi My box is running with AIX 6100-06 and Im the root user of this box My /var gets filled up often to 100% When I investigate I find that it is the below file which increases rapidly /var/spool/mail/pdgadmin I dont know why this file is growing up. Can any one assist me on this.... (2 Replies)
Discussion started by: samsungsamsung
2 Replies

2. UNIX for Advanced & Expert Users

Mail going to /var/spool/mqueue instead of being sent

Hello, I have a bunch of cron jobs in the crontab. For some reason mail from the cron jobs started going to /var/spool/mqueue instead of being sent. Does anyone know why mail from cron jobs would go to the queue instead of being sent? (9 Replies)
Discussion started by: xadamz23
9 Replies

3. UNIX for Advanced & Expert Users

mail is not sent, instead just coping into /var/spool/queue dir

Hi, I have some problems w/ the sendmail. I see that messages are queued in the /var/spool/mqueue and they are never sent to the recipients. This problem just suddenly started without any modifications in the current configuration. I already started and stop the sendmail and it did not help.... (3 Replies)
Discussion started by: ktanya
3 Replies

4. UNIX for Dummies Questions & Answers

/var/spool/mail

Hi, How can i get my mail on either /var/spool/mail or /var/mail? I use mail and sendmail command to send mail. But everytime I send mail it comes to my outlook inbox and when I check with mail command I get the message "No mail for siba". (Note siba is my user Id.) (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

5. UNIX for Dummies Questions & Answers

Sendmail /VAR/SPOOL/MAIL

Hi, First Question: In our company our users have their mailboxes in /var/spool/mail When I look at the users file it seems as if every email sent/received is in that user file! Is this because IMAP is being used or is that just how sendmail works? Second Question: How is that when I create... (3 Replies)
Discussion started by: mojoman
3 Replies

6. UNIX for Dummies Questions & Answers

/VAR/SPOOL/MAIL question

Hi, We have all the user account in a home direcory where their mail is stored and retrieved by email clients. We do however have /var/spool/mail with all the user accounts in it as well Our sendmail.cf is configured to use /var/spool/mqueue as the queue so .what is /var/spool/mail being used... (3 Replies)
Discussion started by: mojoman
3 Replies

7. UNIX for Dummies Questions & Answers

How do I read mail in /var/spool/mail?

How can I read mail sent to /var/spool/mail? I do not have pine installed so forget about that...is there some generic utility I can use? (3 Replies)
Discussion started by: mojoman
3 Replies

8. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

9. UNIX for Dummies Questions & Answers

How safe is it to remove files(/var/spool/mail)?

How safe is it to remove these spooler mail files. I need to make some room in the /usr directory? Any ideas? thanks (2 Replies)
Discussion started by: larcom61
2 Replies

10. UNIX for Dummies Questions & Answers

in var/spool/mail, same entry with different users....

i am on aix, in the /var/spool/mail ,i have an entry as below, after doing a ls -ltr -rw-rw---- 1 ai mail 3898 Sep 02 11:26 mei -rw-rw---- 1 root mail 22900 Nov 08 14:55 root shouldnt the ai and mei be the same just like root, root? thanks (2 Replies)
Discussion started by: yls177
2 Replies
Login or Register to Ask a Question