Date: Mon, 29 Sep 2003 09:11:54 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Lego Builder <mike@sonhosting.net> Cc: freebsd-questions@freebsd.org Subject: Re: No mail notification over ssh! Message-ID: <20030929081154.GA18241@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <34863.137.163.145.226.1064822311.squirrel@www.sonhosting.net> References: <34863.137.163.145.226.1064822311.squirrel@www.sonhosting.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. Cheers, Matthew=09 --=20 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 --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/d+lKdtESqEQa7a0RAgpGAJ47yoZdo7Y0YbZCMY6pJ1Ob8PiA0gCglZYA YryE3N73ah+9TNE74ZV29Mc= =4kVq -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030929081154.GA18241>