Page 1 of 1

/var/spool/mail/nagios huge in size

Posted: Tue Aug 07, 2018 9:24 am
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.

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

Posted: Tue Aug 07, 2018 11:15 am
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.