$MAIL surprise

David Terrell dbt at meat.net
Sat Apr 7 06:05:39 EST 2001


On Fri, Apr 06, 2001 at 12:18:18PM -0700, Steve VanDevender wrote:
> I got email yesterday from a user who had run 'from' and got the message
> "No mail in /home/stevev/$USER" (where $USER was that person's
> username).  At first I thought he had pilfered my .bashrc, but on
> further investigation I discovered that my home directory path had been
> compiled in to sshd, because the configuration tests assume that the
> directory part of $MAIL is the systemwide mail spool.  Unfortunately on
> this system we deliver mail into user home directories, so we set MAIL
> to $HOME/.mail rather than /var/{,spool/}mail/$USER, and this user's
> shell initialization did not change MAIL from the default set by sshd.
> 
> Given that I'm doing something nonstandard, an answer of "don't
> configure OpenSSH with your funky setting of MAIL" is reasonable
> enough.  I can't really think of any clean solution to put into the
> Portable OpenSSH code base to address this; I may end up tweaking our
> local source tree so we get the right thing for our users, but this is
> an interesting configuration problem that people might want to know
> about.

Are you sure the real problem isn't that sshd is started with your 
environment at runtime?  I recently had a similar problem with inetd.
Try starting it like this:

env -i PATH=/some:/reasonable:/subset /usr/local/sbin/sshd

-- 
David Terrell            | "The fact that you can't name the place
dbt at meat.net             | you're going to die doesn't mean you
http://wwn.nebcorp.com/  | shouldn't pay attention to your health." -whg3



More information about the openssh-unix-dev mailing list