By default in linux you get a message saying something like
You have new mail in
when you log into a linux machine.
Sometimes this gets annoying because you always have new mail, or because there seems to be a delay while checking the mail or because the mail is actually stored on some kind of remote disk.
Disabling this setting is easy. Simply include
unset MAILCHECK
in your .bashrc file (for login shell) or .bash_profile (for non-login shells, i.e. ssh) and the message shouldn’t appear.
For me it speeds up login for my linux server and removes clutter.
I got this from:
http://www.savarese.org/patches/bash.html
There is also a more detailed explanation that I found here:
http://www.cygwin.com/ml/cygwin/1998-08/msg00365.html
This page explans the difference between .bashrc and .bash_profile:
http://joshstaiger.org/archives/2005/07/bash_profile_vs.html
Very useful, thanks!
Thanks
A lot of Thank you!
How many times you log in your system? Once per day max?
A 10 characters single line of text per day is what bothers you?
You receive there important information about what is going on in your system, as cronjobs outputs and others, silencing it is not only pointless but stupid.
I disagree that it’s stupid, it’s a choice based on the setup.
If you have a user account on a system that receives external mail, it’s probable that there is always new mail in the account, so the notification actually tells you nothing.
This isn’t turning the mail account off, merely the mail notification, which I personally find to be a distraction.
You must find this indication useful, in which case you should presumably leave it on.