1830210 Members
2231 Online
109999 Solutions
New Discussion

Mail

 
Dushyant.Tyagi
Occasional Advisor

Mail

Dear Gurus
i want to know that how can i Stop the Message "You have new Mail" IN Linux System . is it Possible or not . if Yes then plz let me know , how to Stop

Dushyant

3 REPLIES 3
Ivan Ferreira
Honored Contributor

Re: Mail

Yes, you must unset the MAILCHECK environment variable in the .bash_profile or /etc/profile, or set to a value like -1. For example:

vi .bash_profile

export MAILCHECK=-1

or

vi .bash_profile

unset MAILCHECK

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Dushyant.Tyagi
Occasional Advisor

Re: Mail

Thank You Ivan
I tried to put the entry in #/etc/profile and
#.bash_profile also . but it not Worked . i m still getting the alert "You Have Mail".

=============================================
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

export USERNAME BASH_ENV PATH
export MAILCHECK=-1

=============================================
Alpha977
Valued Contributor

Re: Mail

Hello!

If you receive a "new mail" is probable you have something not work correctly with crontab.
See into the crontab if a script corrupted is launched.

Then, you can edit the /etc/aliases and change the root address:

root : your_mail_account@yourdomain.com

or

you can create another user then "su" and become root, then you don't see mail message.