Is it possible to disable "You have new mail in /var/mail/root"?

Hello =)

Is it possible to disable this notification?
Code:
You have new mail in /var/mail/root
I use Sendmail on the host.

Hugs,
Sandra =)
 
Judging from the tags, you're using the Bash shell. In that case, $ unset MAILCHECK ought to do it. You may wish to put it in your ~/.bashrc or whatever other Bash initialisation file is appropriate.

P.S. This is not related to Sendmail, it's something your shell does.
 
You could also redirect any mail to root to your unpriviledged user account by this in /etc/mail/aliases

Code:
root:   myuser

Run newaliases after editing /etc/mail/aliases or run make aliases in /etc/mail.

Moving root's email to your normal account avoids having to use superuser priviledges to do such a simple thing as reading email to root.
 
kpa said:
Moving root's email to your normal account avoids having to use superuser priviledges to do such a simple thing as reading email to root.
Agreed, that's almost always a sensible thing to do. In fact, it says right there in /etc/mail/aliases:
Code:
# Pretty much everything else in this file points to "root", so
# you would do well in either reading root's mailbox or forwarding
# root's email from here.
Ideally, root doesn't get any email at all, it is instead forwarded to one or more mortal users who actually read their mail.
 
Disable "You have new mail." messages from root

How can I disable
Code:
You have new mail.
messages when I log in as root on FreeBSD? It appears to be messing with several cron jobs that I'm running. How can I disable this message for good?

Thanks for the help.
 
Back
Top