summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfelix <felix@cvs.openbsd.org>1997-04-09 18:47:54 +0000
committerfelix <felix@cvs.openbsd.org>1997-04-09 18:47:54 +0000
commit975051f354d8d3df4a27726b894a457cb7154489 (patch)
tree047a8c40796bbc9ac5f49e05af74749d8c453621
parentc5b71f464c5b262fd5e3197dd4727db2ead5de27 (diff)
Use the value of UU_MACHINE from the environment if present.
This makes the Received header lines more accurate, if rmail is called from Taylor UUCP's uuxqt. (And we ship Taylor UUCP...) Change #define TAYLOR_ENV into #undef TAYLOR_ENV if this should annoy you :-)
-rw-r--r--bin/rmail/rmail.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c
index 188193421e0..399d478c8ed 100644
--- a/bin/rmail/rmail.c
+++ b/bin/rmail/rmail.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmail.c,v 1.6 1997/04/07 10:12:07 deraadt Exp $ */
+/* $OpenBSD: rmail.c,v 1.7 1997/04/09 18:47:53 felix Exp $ */
/* $NetBSD: rmail.c,v 1.8 1995/09/07 06:51:50 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rmail.c 8.3 (Berkeley) 5/15/95";
#else
-static char rcsid[] = "$OpenBSD: rmail.c,v 1.6 1997/04/07 10:12:07 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rmail.c,v 1.7 1997/04/09 18:47:53 felix Exp $";
#endif
#endif /* not lint */
@@ -89,6 +89,8 @@ static char rcsid[] = "$OpenBSD: rmail.c,v 1.6 1997/04/07 10:12:07 deraadt Exp $
void err __P((int, const char *, ...));
void usage __P((void));
+#define TAYLOR_ENV /* use UU_MACHINE if present */
+
int
main(argc, argv)
int argc;
@@ -244,6 +246,15 @@ main(argc, argv)
args[i++] = "-oi"; /* Ignore '.' on a line by itself. */
/* set from system and protocol used */
+#ifdef TAYLOR_ENV
+ {
+ char *uu_machine;
+ uu_machine = getenv("UU_MACHINE");
+ /* set by Taylor UUCP's uuxqt */
+ if (uu_machine)
+ from_sys = uu_machine;
+ }
+#endif
if (from_sys == NULL)
(void)snprintf(buf, sizeof(buf), "-p%s", domain);
else if (strchr(from_sys, '.') == NULL)