On Mon, Sep 29, 2003 at 10:58:31AM +0300, Lego Builder wrote:
> I'm currently setting up a FreeBSD 4.8 mailserver with sendmail, but
> noticed that when I log in through ssh to my box I don't get any mail
> notification from bash. Unlike when I physicaly log in at the box.
> I'd just like to know how I can get mail notification enabled over ssh
> so I know when I've got new/unread mail.

It's the login(1) program that prints the "You have new mail" line
when you log in at the console.  Since login(1) isn't involved when
you ssh(1) into the box, as you've observed you don't get the message.

However, bash(1) has it's own mechanism for telling you if you have
e-mail.  Check the documentation in the bash(1) man page for the MAIL,
MAILCHECK and MAILPATH environment variables.  Note too that you
should be careful to only print out banner messages and so forth for
interactive logins -- for sh(1) alikes the ~/.profile, ~/.bash_login,
or ~/.bashrc files are only sourced if the system thinks the shell is
interactive -- as otherwise you will find that commands like rsync(1)
mysteriously fall over.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to