Hi,
Why I get this message " You have new mail in /var/spool/mail/root " in CentOs?
My queries are the following - 1. Why this is generated ? 2. How to disable this ? 3. Is this system generated ? 4. Is this message gain any importance ?
Thanks, Norah Jones
On Thu, 19 Dec 2013 09:45:26 +0000 Norah Jones nh.jones01@gmail.com wrote:
Hi,
Why I get this message " You have new mail in /var/spool/mail/root " in CentOs?
My queries are the following -
- Why this is generated ?
- How to disable this ?
- Is this system generated ?
- Is this message gain any importance ?
Thanks, Norah Jones
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi,
Basically, this is just a "You've got mail" notification.
Most likely these are system generated logs or errors being mailed to root.
When logged into root type "mail" to see them.
Importance wise, it depends on what you perceive as important.
I myself like to know what is going on with my system so I leave them on, while others do not.
Disabling them would involve either, disabling postfix all together (or any other mailserver), this would prevent all system mail.
Or, if you are using this as an email server, disabling other things such as logwatch, and any other script which may mail root,
Lastly another option is creating a dumby user for all mail directed at root to go by setting up aliases in /etc/aliases (Basically at end: root: dumbyuser) and then running newaliases.
Hope this helps :-).
Regards, Jake Shipton (JakeMS) GPG Key: 0xE3C31D8F GPG Fingerprint: 7515 CC63 19BD 06F9 400A DE8A 1D0B A5CF E3C3 1D8F
On 2013-12-19, Norah Jones nh.jones01@gmail.com wrote:
Why I get this message " You have new mail in /var/spool/mail/root " in CentOs?
My queries are the following -
- Why this is generated ?
Because root has mail in his mailbox.
- How to disable this ?
You can disable the message with biff n (IIRC). You can also redirect root's (future) mail to a user mailbox by modifying /etc/aliases and running newaliases when done. (That will not do anything with mail already delivered to root.)
- Is this system generated ?
The message is system-generated. The mail is very likely output from various system jobs, like cron jobs or other daemons. In theory a person could have send a message to root but that's not very common.
- Is this message gain any importance ?
The only way to know is by reading the messages! Some of them may simply be informational, others may be important.
--keith
On Thu, Dec 19, 2013 at 09:56:36AM -0800, Keith Keller wrote:
You can disable the message with biff n (IIRC). You can also redirect root's (future) mail to a user mailbox by modifying /etc/aliases and running newaliases when done. (That will not do anything with mail already delivered to root.)
man bash; "Shell Variables"
MAILCHECK Specifies how often (in seconds) bash checks for mail. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, or set to a value that is not a number greater than or equal to zero, the shell disables mail checking.
John
On Thu, Dec 19, 2013 at 3:45 AM, Norah Jones nh.jones01@gmail.com wrote:
- Is this message gain any importance ?
No one else can decide what is important to you. But it can be things like 'your hard disk is about to fail'.
From: Norah Jones nh.jones01@gmail.com
Why I get this message " You have new mail in /var/spool/mail/root " in CentOs? My queries are the following - 1. Why this is generated ?
Because a mail was sent to the root user...
- How to disable this ?
MAILCHECK Specifies how often (in seconds) bash checks for mail. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, or set to a value that is not a number greater than or equal to zero, the shell disables mail checking.
- Is this system generated ?
Read the mail and see who sent it.
- Is this message gain any importance ?
Read the mail and see if it is important...
If you want mail for root to go to another user, edit /etc/aliases
JD