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



## littlesandra88 (Apr 29, 2013)

Hello =)

Is it possible to disable this notification?

```
You have new mail in /var/mail/root
```
I use Sendmail on the host.

Hugs,
Sandra =)


----------



## fonz (Apr 29, 2013)

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.


----------



## kpa (Apr 29, 2013)

You could also redirect any mail to root to your unpriviledged user account by this in /etc/mail/aliases


```
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.


----------



## fonz (Apr 29, 2013)

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:
	
	



```
# 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.


----------



## jonfr (May 10, 2013)

*Disable "You have new mail." messages from root*

How can I disable 
	
	



```
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.


----------



## cpm@ (May 10, 2013)

Thread duplicated.


----------



## DutchDaemon (May 10, 2013)

Merged in.


----------



## fonz (May 10, 2013)

DutchDaemon said:
			
		

> Merged in.


I should have thought of that


----------

