mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
rfc 3834 support: Auto-Submitted: auto-generated on lots of things; from Tamas TEVESZ; ok millert
This commit is contained in:
parent
056c50b236
commit
775a26833e
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: io.c,v 1.32 2005/11/24 19:36:10 moritz Exp $ */
|
||||
/* $OpenBSD: io.c,v 1.33 2006/12/11 20:50:54 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
@ -39,7 +39,7 @@ static const char copyright[] =
|
||||
#if 0
|
||||
static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
|
||||
#else
|
||||
static const char rcsid[] = "$OpenBSD: io.c,v 1.32 2005/11/24 19:36:10 moritz Exp $";
|
||||
static const char rcsid[] = "$OpenBSD: io.c,v 1.33 2006/12/11 20:50:54 deraadt Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -73,7 +73,8 @@ struct iovec header[] = {
|
||||
{ NULL, 0 },
|
||||
{ "\nSubject: ", 10 },
|
||||
{ NULL, 0 },
|
||||
{ "'s Calendar\nPrecedence: bulk\n\n", 30 },
|
||||
{ "'s Calendar\nPrecedence: bulk\n", 29 },
|
||||
{ "Auto-Submitted: auto-generated\n\n", 32 },
|
||||
};
|
||||
|
||||
|
||||
@ -425,7 +426,7 @@ closecal(FILE *fp)
|
||||
|
||||
header[1].iov_base = header[3].iov_base = pw->pw_name;
|
||||
header[1].iov_len = header[3].iov_len = strlen(pw->pw_name);
|
||||
writev(pdes[1], header, 7);
|
||||
writev(pdes[1], header, 8);
|
||||
while ((nread = read(fileno(fp), buf, sizeof(buf))) > 0)
|
||||
(void)write(pdes[1], buf, nread);
|
||||
(void)close(pdes[1]);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: newsyslog.c,v 1.82 2004/09/14 22:25:33 deraadt Exp $ */
|
||||
/* $OpenBSD: newsyslog.c,v 1.83 2006/12/11 20:50:54 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2002, 2003 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$OpenBSD: newsyslog.c,v 1.82 2004/09/14 22:25:33 deraadt Exp $";
|
||||
static const char rcsid[] = "$OpenBSD: newsyslog.c,v 1.83 2006/12/11 20:50:54 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef CONF
|
||||
@ -1044,6 +1044,7 @@ domonitor(struct conf_entry *ent)
|
||||
warn("openmail");
|
||||
goto cleanup;
|
||||
}
|
||||
fprintf(fp, "Auto-Submitted: auto-generated\n");
|
||||
fprintf(fp, "To: %s\nSubject: LOGFILE NOTIFICATION: %s\n\n\n",
|
||||
ent->whom, ent->log);
|
||||
fwrite(rb, 1, rd, fp);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: docmd.c,v 1.19 2004/01/16 01:12:35 espie Exp $ */
|
||||
/* $OpenBSD: docmd.c,v 1.20 2006/12/11 20:50:54 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#ifndef lint
|
||||
/* from: static char sccsid[] = "@(#)docmd.c 8.1 (Berkeley) 6/9/93"; */
|
||||
static char *rcsid = "$OpenBSD: docmd.c,v 1.19 2004/01/16 01:12:35 espie Exp $";
|
||||
static char *rcsid = "$OpenBSD: docmd.c,v 1.20 2006/12/11 20:50:54 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "defs.h"
|
||||
@ -574,6 +574,7 @@ notify(file, rhost, to, lmod)
|
||||
/*
|
||||
* Output the proper header information.
|
||||
*/
|
||||
fprintf(pf, "Auto-Submitted: auto-generated\n");
|
||||
fprintf(pf, "From: rdist (Remote distribution program)\n");
|
||||
fprintf(pf, "To:");
|
||||
if (!any('@', to->n_name) && rhost != NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: docmd.c,v 1.18 2006/02/12 15:51:36 moritz Exp $ */
|
||||
/* $OpenBSD: docmd.c,v 1.19 2006/12/11 20:50:54 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983 Regents of the University of California.
|
||||
@ -37,7 +37,7 @@ static char RCSid[] __attribute__((__unused__)) =
|
||||
"$From: docmd.c,v 1.8 2001/03/12 18:42:23 kim Exp $";
|
||||
#else
|
||||
static char RCSid[] __attribute__((__unused__)) =
|
||||
"$OpenBSD: docmd.c,v 1.18 2006/02/12 15:51:36 moritz Exp $";
|
||||
"$OpenBSD: docmd.c,v 1.19 2006/12/11 20:50:54 deraadt Exp $";
|
||||
#endif
|
||||
|
||||
static char sccsid[] __attribute__((__unused__)) =
|
||||
@ -164,6 +164,7 @@ notify(char *rhost, struct namelist *to, time_t lmod)
|
||||
/*
|
||||
* Output the proper header information.
|
||||
*/
|
||||
(void) fprintf(pf, "Auto-Submitted: auto-generated\n");
|
||||
(void) fprintf(pf, "From: rdist (Remote distribution program)\n");
|
||||
(void) fprintf(pf, "To:");
|
||||
if (!any('@', to->n_name) && rhost != NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: skeyaudit.c,v 1.22 2005/10/26 17:06:39 millert Exp $ */
|
||||
/* $OpenBSD: skeyaudit.c,v 1.23 2006/12/11 20:50:54 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 2000, 2003 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
@ -153,6 +153,7 @@ notify(struct passwd *pw, int seq, int interactive)
|
||||
|
||||
if (!interactive)
|
||||
(void)fprintf(out,
|
||||
"Auto-Submitted: auto-generated\n"
|
||||
"To: %s\nSubject: IMPORTANT action required\n", pw->pw_name);
|
||||
|
||||
if (seq)
|
||||
|
@ -514,7 +514,8 @@ send_mail(line)
|
||||
mail = fdopen(pfd[1], "w");
|
||||
|
||||
/* Pipes are all setup, send message via sendmail. */
|
||||
(void) fprintf(mail, "To: %s\nFrom: %s\nSubject: ",
|
||||
(void) fprintf(mail, "Auto-Submitted: auto-generated\n"
|
||||
"To: %s\nFrom: %s\nSubject: ",
|
||||
def_mailto, user_name);
|
||||
for (p = def_mailsub; *p; p++) {
|
||||
/* Expand escapes in the subject */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: recover.c,v 1.10 2006/04/28 19:48:15 jaredy Exp $ */
|
||||
/* $OpenBSD: recover.c,v 1.11 2006/12/11 20:50:55 deraadt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994
|
||||
@ -403,14 +403,15 @@ rcv_mailfile(sp, issync, cp_path)
|
||||
(void)time(&now);
|
||||
(void)gethostname(host, sizeof(host));
|
||||
len = snprintf(buf, sizeof(buf),
|
||||
"%s%s\n%s%s\n%s\n%s\n%s%s\n%s%s\n%s\n\n",
|
||||
"%s%s\n%s%s\n%s\n%s\n%s%s\n%s%s\n%s\n%s\n\n",
|
||||
VI_FHEADER, t, /* Non-standard. */
|
||||
VI_PHEADER, cp_path, /* Non-standard. */
|
||||
"Reply-To: root",
|
||||
"From: root (Nvi recovery program)",
|
||||
"To: ", pw->pw_name,
|
||||
"Subject: Nvi saved the file ", p,
|
||||
"Precedence: bulk"); /* For vacation(1). */
|
||||
"Precedence: bulk", /* For vacation(1). */
|
||||
"Auto-Submitted: auto-generated");
|
||||
if (len > sizeof(buf) - 1)
|
||||
goto lerr;
|
||||
if (write(fd, buf, len) != len)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: printjob.c,v 1.40 2005/04/28 10:14:26 moritz Exp $ */
|
||||
/* $OpenBSD: printjob.c,v 1.41 2006/12/11 20:50:55 deraadt Exp $ */
|
||||
/* $NetBSD: printjob.c,v 1.31 2002/01/21 14:42:30 wiz Exp $ */
|
||||
|
||||
/*
|
||||
@ -1121,6 +1121,7 @@ sendmail(char *user, int bombed)
|
||||
_exit(0);
|
||||
} else if (s > 0) { /* parent */
|
||||
dup2(p[1], 1);
|
||||
printf("Auto-Submitted: auto-generated\n");
|
||||
printf("To: %s@%s\n", user, fromhost);
|
||||
printf("Subject: %s printer job \"%s\"\n", printer,
|
||||
*jobname ? jobname : "<unknown>");
|
||||
|
Loading…
Reference in New Issue
Block a user