From owner-freebsd-questions@FreeBSD.ORG Mon Sep 29 01:12:06 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C733416A4B3 for ; Mon, 29 Sep 2003 01:12:06 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7DFC43F75 for ; Mon, 29 Sep 2003 01:12:04 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h8T8Bsfs018676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Sep 2003 09:11:57 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id h8T8BsTG018675; Mon, 29 Sep 2003 09:11:54 +0100 (BST) (envelope-from matthew) Date: Mon, 29 Sep 2003 09:11:54 +0100 From: Matthew Seaman To: Lego Builder Message-ID: <20030929081154.GA18241@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Lego Builder , freebsd-questions@freebsd.org References: <34863.137.163.145.226.1064822311.squirrel@www.sonhosting.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <34863.137.163.145.226.1064822311.squirrel@www.sonhosting.net> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: No mail notification over ssh! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2003 08:12:06 -0000 --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--