summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-12-16 18:37:18 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-12-16 18:37:18 +0000
commitf938cae82d8e2a5dd4b4414632f66308c45e2634 (patch)
tree2a4b1772a799e4dd1e39081038ab3f204f9051bb
parentd4dfd2f710814067c340f604272122c2c5267d61 (diff)
Don't pass options after the to address to sendmail. The only
legitiate use of this is to set the sender name which should be handled specifically by a different option.
-rw-r--r--usr.bin/mail/mail.13
-rw-r--r--usr.bin/mail/main.c8
2 files changed, 3 insertions, 8 deletions
diff --git a/usr.bin/mail/mail.1 b/usr.bin/mail/mail.1
index af380cd2405..f7828c94ad4 100644
--- a/usr.bin/mail/mail.1
+++ b/usr.bin/mail/mail.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mail.1,v 1.69 2014/12/16 18:36:46 millert Exp $
+.\" $OpenBSD: mail.1,v 1.70 2014/12/16 18:37:17 millert Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -45,7 +45,6 @@
.Op Fl c Ar list
.Op Fl s Ar subject
.Ar to-addr ...
-.Op Fl Ar sendmail-options ...
.Ek
.Nm mail
.Op Fl dEIiNnv
diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c
index b6e9ebbc039..d7faa687972 100644
--- a/usr.bin/mail/main.c
+++ b/usr.bin/mail/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.25 2014/11/24 20:03:33 millert Exp $ */
+/* $OpenBSD: main.c,v 1.26 2014/12/16 18:37:17 millert Exp $ */
/* $NetBSD: main.c,v 1.7 1997/05/13 06:15:57 mikel Exp $ */
/*
@@ -171,10 +171,8 @@ main(int argc, char **argv)
errx(1, "Cannot give -f and people to send to");
}
} else {
- for (i = optind; (argv[i]) && (*argv[i] != '-'); i++)
+ for (i = optind; argv[i]; i++)
to = cat(to, nalloc(argv[i], GTO));
- for (; argv[i]; i++)
- smopts = cat(smopts, nalloc(argv[i], 0));
}
/*
* Check for inconsistent arguments.
@@ -275,8 +273,6 @@ usage(void)
fprintf(stderr, "usage: %s [-dEIinv] [-b list] [-c list] "
"[-s subject] to-addr ...\n", __progname);
- fprintf(stderr, " %*s [-sendmail-options ...]\n",
- (int)strlen(__progname), "");
fprintf(stderr, " %s [-dEIiNnv] -f [file]\n", __progname);
fprintf(stderr, " %s [-dEIiNnv] [-u user]\n", __progname);
exit(1);