diff options
author | jkh <jkh@FreeBSD.org> | 1996-10-06 01:55:32 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-10-06 01:55:32 +0000 |
commit | 336dd89b3198be948d57de4a801c28a9070426c7 (patch) | |
tree | 89ca204ab60f787060792352ababf96ed20584e7 /usr.bin/mail/v7.local.c | |
parent | 588cbc505965a59cfcff6441c1175864be71ab1a (diff) | |
download | FreeBSD-src-336dd89b3198be948d57de4a801c28a9070426c7.zip FreeBSD-src-336dd89b3198be948d57de4a801c28a9070426c7.tar.gz |
Honor the MAIL environment variable.
Submitted-By: Dan Cross <cross@math.psu.edu>
Diffstat (limited to 'usr.bin/mail/v7.local.c')
-rw-r--r-- | usr.bin/mail/v7.local.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/mail/v7.local.c b/usr.bin/mail/v7.local.c index 5144c01..ade3cbd 100644 --- a/usr.bin/mail/v7.local.c +++ b/usr.bin/mail/v7.local.c @@ -55,7 +55,12 @@ void findmail(user, buf) char *user, *buf; { - (void)sprintf(buf, "%s/%s", _PATH_MAILDIR, user); + char *tmp = getenv("MAIL"); + + if (tmp == NULL) + (void)sprintf(buf, "%s/%s", _PATH_MAILDIR, user); + else + (void)strcpy(buf, tmp); } /* |