When I open up my terminal it says "you have mail", anyone has any idea of why? I am running OS X, but since it too is based on Unix and relies on files such as bashrc, bash_profile etc. I thought somebody here might know, and I'm not sure it's a platform specific problem!
It sounds like something has sent mail on (and to) the machine using the local mail exchanger. Most likely the email is an automated message from some installed package. Once you log in, type
It is a "platform specific problem" :-)
Mac OS X uses as default shell the BASH like many other Un*x/Linux systems.
Mail from your system is stored in mailbox for your user, often located in
Because sometimes your mailbox will contain important messages (a failed cronjob task, etc.) you don't to check it every time by yourself.
The BASH (and many other shells) have a feature called mailcheck, which outputs your message the first time you open your terminal.
$MAILCHECK is an environment variable which contains the seconds when its time to check for new mail. Mail is also checked before displaying the primary prompt.
See more in
To prevent the checks for new mail, you can simply unset $MAILCHECK. The right place for this is your .bashrc file, which will be read when you open up a shell. Its in your user home directory.
Append to ~/.bashrc:
to disable the message.
Of course it is also possible to simply delete the mails like T.J. Crowder mentioned :-)
Using Raspian (Debian based distro for Raspberry Pi) over SSH, I had to comment out the following line in /etc/pam.d/sshd to get rid of it.