This is such a n00b question.....
The /var/spool/mail/root file is growing larger every day. I'm assuming that the messages in there are important or they wouldn't be sent. Is there some way I can forward them to another account? Is there a mail reader buried in Nagios XI for this? Or is it safe to ignore the generated mail?
/var/spool/mail/root How to read the mail?
Re: /var/spool/mail/root How to read the mail?
Reading root mail:
You can read root's mail by running this command in terminal:
Scroll down to read all of the messages.
If you want to see only the last 10 messages, you can run:
Or you can save all of the root's mail by redirecting it to a file,
which you can review later, for example:
You can also set it up so it will be resent to a different e-mail:
Note: You can use a different text editor (besides vi) if you are more
comfortable.
Scroll down. Close to the end of the file, you should see something like
this:
Type your e-mail, so it will look like this:
Save the file and type in terminal:
Hit "Enter" to apply changes.
Here's the link to the CentOS forum, dealing with root mail:
https://www.centos.org/modules/newbb/vi ... ic_id=5674
Deleting root's mail:
You can also delete all of the messages in your root's mail by running in terminal:
Hope this helps.
You can read root's mail by running this command in terminal:
Code: Select all
# cat /var/spool/mail/root | lessIf you want to see only the last 10 messages, you can run:
Code: Select all
# tail /var/spool/mail/rootwhich you can review later, for example:
Code: Select all
# cat /var/spool/mail/root > rootmail.txtCode: Select all
# vi /etc/aliasescomfortable.
Scroll down. Close to the end of the file, you should see something like
this:
Code: Select all
# Person who should get root's mail
root:Code: Select all
# Person who should get root's mail
root: my_email@my_company.comCode: Select all
# newaliasesHere's the link to the CentOS forum, dealing with root mail:
https://www.centos.org/modules/newbb/vi ... ic_id=5674
Deleting root's mail:
You can also delete all of the messages in your root's mail by running in terminal:
Code: Select all
# cat /dev/null > /var/spool/mail/rootBe sure to check out our Knowledgebase for helpful articles and solutions!