LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-11-2012, 10:40 PM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Question How to disable mail notification at console login ?


Hi.

So each time i log in in console mode, i have the mail notification.
I searched around, but found nothing that worked.

How to disable this ?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-11-2012, 11:12 PM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Presuming you are using bash, have you inspected the bash initialisation files to see what is triggering it -- /etc/profile (the most likley candidate), one of ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order and ~/.bashrc (often sourced by ~/.bash_profile)
 
Old 03-12-2012, 08:59 AM   #3
bormant
Member
 
Registered: Jan 2008
Posts: 426

Rep: Reputation: 240Reputation: 240Reputation: 240
/etc/profile
Code:
...
# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
 biff y 2> /dev/null
fi
...
For bash shell add
Code:
if [ -x /usr/bin/biff ]; then
 biff n 2> /dev/null
fi
to one or more of ~/.bash_profile, ~/.bash_login, ~/.profile or ~/.bashrc. See "man bash" to check when bash execute them. For another shell see the appropriate manual.

Last edited by bormant; 03-12-2012 at 09:10 AM.
 
Old 03-12-2012, 10:30 AM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
/etc/profile.d:

MAIL_CHECK_ENAB no
 
Old 03-12-2012, 11:06 AM   #5
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
If this is the notification we see when logging in as root, you could always just read the mail.
Type: mail
 
Old 03-12-2012, 09:08 PM   #6
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
I'm sorry, but it doesn't work :/.
 
Old 03-12-2012, 09:34 PM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by Linux.tar.gz View Post
I'm sorry, but it doesn't work :/.
What doesn't work? How doesn't it work?
 
Old 03-13-2012, 03:09 AM   #8
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Or type mutt.
 
Old 03-13-2012, 02:19 PM   #9
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Try this in ~/.bashrc:

unset MAILCHECK
 
Old 03-15-2012, 03:53 PM   #10
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Didn't work either.
Still have the "No Mail." at login.
 
Old 03-15-2012, 07:06 PM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
A more brutal approach would be to comment out the appropriate line in /etc/inetd.conf
Code:
# The comsat daemon notifies the user of new mail when biff is set to y:
comsat        dgram   udp     wait    root    /usr/sbin/tcpd  in.comsat
 
Old 03-15-2012, 08:16 PM   #12
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Didn't work either.
Still have the "No Mail." at login.
Check the startup scripts for something that is explicitly checking mail.
 
Old 03-16-2012, 06:11 AM   #13
phi11ip
Member
 
Registered: Jul 2007
Location: Nottingham, UK
Distribution: Slackware64-current
Posts: 93

Rep: Reputation: 23
Try
Code:
biff n
in your ~/.bashrc file
 
Old 03-16-2012, 08:02 AM   #14
mycinka
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
/etc/login.defs
MAIL_CHECK_ENAB no
 
Old 03-16-2012, 10:43 AM   #15
aocab
Member
 
Registered: Nov 2009
Location: Heart of Texas
Distribution: Slackware-current
Posts: 138

Rep: Reputation: 30
Using Slackware current and testing this out...

This does not work for me:
in /etc/profile
Code:
if [ -x /usr/bin/biff ]; then
 biff n 2> /dev/null
fi
Once logged in:
Code:
biff
is n
This does not work for me:
in ~/.bashrc or ~/.bash_profile
Code:
if [ -x /usr/bin/biff ]; then
 biff n 2> /dev/null
fi
Once logged in:
Code:
biff
is n
@Woodsman: I was not sure how to check this one as
/etc/profile.d is a folder here and I was not sure
exactly where to put the code.

/etc/profile.d:
Code:
MAIL_CHECK_ENAB no
This did not work for me:
in ~/.bashrc or ~/.bash_profile
Code:
unset MAILCHECK
Once logged in:
Code:
set | grep MAILCHECK
returns nothing

This did not work for me:
in /etc/inetd.conf
Code:
# The comsat daemon notifies the user of new mail when biff is set to y:
#comsat        dgram   udp     wait    root    /usr/sbin/tcpd  in.comsat
I made the change and rebooted but I still get the "No Mail." message.

This worked for me:
/etc/login.defs
Code:
MAIL_CHECK_ENAB no
but is global.

Looking through the startup scripts, I'm not seeing where mail is getting checked.

The documentation appears to indicate that this can be done.
So how does one turn off mail notification for a particular user?

Just curious.

Cheers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable the new mail notification in console mode? retypedef Linux - Newbie 6 03-21-2010 04:15 AM
Disable commandline new mail notification fw12 Linux - General 2 11-28-2006 04:47 PM
E-Mail notification to users via SMS (gateway script ok, but notification script?!?) Riku2015 Linux - Networking 10 03-08-2002 10:16 AM
Disable/Enable Root Login @ Console ryanstrayer Linux - Security 4 01-18-2002 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration