How can I prevent the "You have mail." message from displaying every time I open the Terminal

8

Every time I open the Terminal, I get the "You have mail." message, but I do not have any mail. When I run MAIL it reads, "No mail for myusername". I have tried several methods to prevent this from occurring every time I use the Terminal, including adding unset MAILCHECK to my bash profile.

maxskybarger

Posted 2012-04-10T16:35:28.320

Reputation: 81

2Read your mail. runs – Ignacio Vazquez-Abrams – 2012-04-10T16:44:28.950

4

see also http://unix.stackexchange.com/q/2432/4667 and http://superuser.com/q/25738/4714

– glenn jackman – 2012-04-10T16:47:38.243

yep, check /var/mail/username, as suggested by the above links; maybe something go stuck there – lupincho – 2012-04-10T16:49:52.843

just checked, even having empty directory /var/mail/username results in "you have mail", deleting the 'username' directory in /var/mail fixes this – lupincho – 2012-04-10T16:53:53.150

@maxskybarger -- if there is something in /var/mail/username indeed, you may want to look at the contents and figure out what has sent it; a lot of *nix software sends all sorts of emails by default, you may want to turn that off – lupincho – 2012-04-10T17:03:05.323

2Thanks for the clue. There were two blank lines in /var/mail/username and removing them solved the problem. – maxskybarger – 2012-04-10T18:23:19.153

8Please answer the question yourself so you can mark it as accepted! – slhck – 2012-04-10T18:53:36.950

2Try adding the following line to your ~/.bashrc unset MAILCHECK – Krzysztof Rosiński – 2012-04-10T16:41:34.127

Answers

6

From the comments on the question:

check /var/mail/<username>

There were two blank lines in /var/mail/<username> and removing them solved the problem.

Also, deleting the <username> directory in /var/mail will fix this.

JoshP

Posted 2012-04-10T16:35:28.320

Reputation: 2 236