View | Details | Raw Unified | Return to bug 21570
Collapse All | Expand All

(-)mail.1 (+3 lines)
Lines 44-49 Link Here
44
.Op Fl s Ar subject
44
.Op Fl s Ar subject
45
.Op Fl c Ar cc-addr
45
.Op Fl c Ar cc-addr
46
.Op Fl b Ar bcc-addr
46
.Op Fl b Ar bcc-addr
47
.Op Fl r Ar reply-to
47
.Ar to-addr ...
48
.Ar to-addr ...
48
.Op \&- Ar sendmail-option ...
49
.Op \&- Ar sendmail-option ...
49
.Nm mail
50
.Nm mail
Lines 99-104 Link Here
99
Send blind carbon copies to
100
Send blind carbon copies to
100
.Ar list .
101
.Ar list .
101
List should be a comma-separated list of names.
102
List should be a comma-separated list of names.
103
.It Fl r
104
Specify the Reply-To field on the command line.
102
.It Fl f
105
.It Fl f
103
Read in the contents of your
106
Read in the contents of your
104
.Ar mbox
107
.Ar mbox
(-)main.c (-3 / +6 lines)
Lines 91-97 Link Here
91
	smopts = NIL;
91
	smopts = NIL;
92
	subject = NOSTR;
92
	subject = NOSTR;
93
	replyto = NOSTR;
93
	replyto = NOSTR;
94
	while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != -1) {
94
	while ((i = getopt(argc, argv, "INT:b:c:dfinr:s:u:v")) != -1) {
95
		switch (i) {
95
		switch (i) {
96
		case 'T':
96
		case 'T':
97
			/*
97
			/*
Lines 122-127 Link Here
122
		case 'd':
122
		case 'd':
123
			debug++;
123
			debug++;
124
			break;
124
			break;
125
		case 'r':
126
			replyto = optarg;
127
			break;
125
		case 's':
128
		case 's':
126
			/*
129
			/*
127
			 * Give a subject field for sending from
130
			 * Give a subject field for sending from
Lines 182-189 Link Here
182
			break;
185
			break;
183
		case '?':
186
		case '?':
184
			fputs("\
187
			fputs("\
185
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...\n\
188
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] [-r reply-to]\n\
186
            [- sendmail-options ...]\n\
189
            to-addr ... [- sendmail-options ...]\n\
187
       mail [-iInNv] -f [name]\n\
190
       mail [-iInNv] -f [name]\n\
188
       mail [-iInNv] [-u user]\n",
191
       mail [-iInNv] [-u user]\n",
189
				stderr);
192
				stderr);
(-)quit.c (-2 / +2 lines)
Lines 390-396 Link Here
390
	FILE *obuf, *ibuf, *readstat;
390
	FILE *obuf, *ibuf, *readstat;
391
	struct stat statb;
391
	struct stat statb;
392
	char tempname[30];
392
	char tempname[30];
393
	char *mktemp();
393
	int mkstemp();
394
394
395
	if (readonly)
395
	if (readonly)
396
		return;
396
		return;
Lines 421-427 Link Here
421
	if (stat(mailname, &statb) >= 0 && statb.st_size > mailsize) {
421
	if (stat(mailname, &statb) >= 0 && statb.st_size > mailsize) {
422
		strcpy(tempname, tmpdir);
422
		strcpy(tempname, tmpdir);
423
		strcat(tempname, "mboxXXXXXX");
423
		strcat(tempname, "mboxXXXXXX");
424
		mktemp(tempname);
424
		mkstemp(tempname);
425
		if ((obuf = Fopen(tempname, "w")) == NULL) {
425
		if ((obuf = Fopen(tempname, "w")) == NULL) {
426
			perror(tempname);
426
			perror(tempname);
427
			relsesigs();
427
			relsesigs();
(-)temp.c (-5 / +5 lines)
Lines 77-99 Link Here
77
	if ((tempMail = malloc(len + sizeof("RsXXXXXX"))) == NULL)
77
	if ((tempMail = malloc(len + sizeof("RsXXXXXX"))) == NULL)
78
		panic("Out of memory");
78
		panic("Out of memory");
79
	strcpy(tempMail, tmpdir);
79
	strcpy(tempMail, tmpdir);
80
	mktemp(strcat(tempMail, "RsXXXXXX"));
80
	mkstemp(strcat(tempMail, "RsXXXXXX"));
81
	if ((tempResid = malloc(len + sizeof("RqXXXXXX"))) == NULL)
81
	if ((tempResid = malloc(len + sizeof("RqXXXXXX"))) == NULL)
82
		panic("Out of memory");
82
		panic("Out of memory");
83
	strcpy(tempResid, tmpdir);
83
	strcpy(tempResid, tmpdir);
84
	mktemp(strcat(tempResid, "RqXXXXXX"));
84
	mkstemp(strcat(tempResid, "RqXXXXXX"));
85
	if ((tempQuit = malloc(len + sizeof("RmXXXXXX"))) == NULL)
85
	if ((tempQuit = malloc(len + sizeof("RmXXXXXX"))) == NULL)
86
		panic("Out of memory");
86
		panic("Out of memory");
87
	strcpy(tempQuit, tmpdir);
87
	strcpy(tempQuit, tmpdir);
88
	mktemp(strcat(tempQuit, "RmXXXXXX"));
88
	mkstemp(strcat(tempQuit, "RmXXXXXX"));
89
	if ((tempEdit = malloc(len + sizeof("ReXXXXXX"))) == NULL)
89
	if ((tempEdit = malloc(len + sizeof("ReXXXXXX"))) == NULL)
90
		panic("Out of memory");
90
		panic("Out of memory");
91
	strcpy(tempEdit, tmpdir);
91
	strcpy(tempEdit, tmpdir);
92
	mktemp(strcat(tempEdit, "ReXXXXXX"));
92
	mkstemp(strcat(tempEdit, "ReXXXXXX"));
93
	if ((tempMesg = malloc(len + sizeof("RxXXXXXX"))) == NULL)
93
	if ((tempMesg = malloc(len + sizeof("RxXXXXXX"))) == NULL)
94
		panic("Out of memory");
94
		panic("Out of memory");
95
	strcpy(tempMesg, tmpdir);
95
	strcpy(tempMesg, tmpdir);
96
	mktemp(strcat(tempMesg, "RxXXXXXX"));
96
	mkstemp(strcat(tempMesg, "RxXXXXXX"));
97
97
98
	/*
98
	/*
99
	 * It's okay to call savestr in here because main will
99
	 * It's okay to call savestr in here because main will

Return to bug 21570