/var/spool/mail/nagios huge in size

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

/var/spool/mail/nagios huge in size

Post by sandeepatil »

In directory /var/spool/mail/ nagios file size is very huge around 4.2GB

Please explain why this file increasing and what is steps for avoid this issue.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: /var/spool/mail/nagios huge in size

Post by lmiltchev »

Do you have a contact that is configured to receive mail locally, e.g. nagios@localhost?

Have you opened the /var/spool/mail/nagios in a text editor to see what kind of messages are you receiving?

Note: Since the file is so big, I would recommend using "less", otherwise you may not be able to open the file.

Are you using postfix? Have you set up any aliases for redirecting mail for local recipients?

If you don't need these emails, and you would like to clear the file, you could run:

Code: Select all

cat /dev/null > /var/spool/mail/nagios
The command above will remove all messages from /var/spool/mail/nagios.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked