Alright I've narrowed down my problem. If mail is sent to a user, and that
user is already logged onto the box, then they do get informed that they
have new mail. But If mail is sent to a user, and *then* they log into the
box, they simply get "No mail." Even if the user gets a message that they
have mail when they're already logged in, if they log out without checking
mail, and log back in, they still get "No mail."

Any ideas about why its not saying anything about new mail upon login?

Eric
----- Original Message -----
From: "Jack O'Toole" <[EMAIL PROTECTED]>
To: "Eric Lalonde" <[EMAIL PROTECTED]>
Sent: Thursday, February 17, 2000 7:24 PM
Subject: Re: no mail notification (WAS: streamlining symbolic links)


> From the man page for bash
>
>        MAIL   If this parameter is set  to  a  filename  and  the
>               MAILPATH variable is not set, bash informs the user
>               of the arrival of mail in the specified file.
>        MAILCHECK
>               Specifies how often (in seconds)  bash  checks  for
>               mail.   The default is 60 seconds.  When it is time
>               to check for mail, the shell does so before prompt­
>               ing.  If this variable is unset, the shell disables
>               mail checking.
>        MAILPATH
>               A colon-separated list of pathnames to  be  checked
>               for  mail.  The message to be printed may be speci­
>               fied by separating the pathname  from  the  message
>               with  a `?'.  $_ stands for the name of the current
>               mailfile.  Example:
>               MAILPATH='/usr/spool/mail/bfox?"You            have
>               mail":~/shell-mail?"$_ has mail!"'
>               Bash  supplies  a  default value for this variable,
>               but the location of the user  mail  files  that  it
>               uses      is      system      dependent      (e.g.,
>               /usr/spool/mail/$USER).
>        MAIL_WARNING
>               If set, and a file that bash is checking  for  mail
>               has  been  accessed  since  the  last  time  it was
>               checked, the message ``The  mail  in  mailfile  has
>               been read'' is printed.
>
> Check these other variables to make sure they're set properly.
Specifically
> make sure MAILCHECK is set.  I think you have to hit enter, as if bash
waits
> until it redraws a prompt, but I may be wrong.  But it works for me:
>
> [23:18:22 Thu Feb 17]
> [jack @ serv1: ~]--> $
> You have new mail in /home/jack/Mailbox
>
> Regards
>
> Eric Lalonde wrote:
>
> > I have added the following to /etc/bashrc:
> > export MAIL="$HOME/Mailbox"
> >
> > Then i sent mail to the user.
> > Waiting at least sixty seconds, the default time for new mail to be
> > recognized by bash, I logged the user in and got "No mail."
> > However, when I ran pine, there was one message waiting for the user in
> > their mailbox (/home/testguy/Mailbox). Also, I typed $MAIL at the prompt
> > just to see if it actually set the variable. It did, and outputted
> > bash: /home/testguy/Mailbox: Permission denied
> > It tried to execute it i guess. So I've set the right variables, yet
there
> > is still no mail notification. When the mail is delivered, its logged as
the
> > following:
> > Feb 17 13:32:09 damacles qmail: 950812329.586803 info msg 40216: bytes
860
> > from <[EMAIL PROTECTED]> qp 5997 uid 505
> > Feb 17 13:32:09 damacles qmail: 950812329.591122 starting delivery 11:
msg
> > 40216 to local [EMAIL PROTECTED]
> > Feb 17 13:32:09 damacles qmail: 950812329.591253 status: local 1/10
remote
> > 0/20
> > Feb 17 13:32:09 damacles qmail: 950812329.620449 delivery 11: success:
> > did_0+0+1/
> > Feb 17 13:32:09 damacles qmail: 950812329.620717 status: local 0/10
remote
> > 0/20
> > Feb 17 13:32:09 damacles qmail: 950812329.620818 end msg 40216
> >
> > Anyone know why there is still no mail notification? There's no symbolic
> > link to /var/spool/mail/testguy, because I'm trying to avoid doing that
for
> > each user. (Hence setting the MAIL variable in bash).
> >
> > Thanks for the help,
> >
> > Eric
>

Reply via email to