From d81195fae17abd067cd7f96e07ce2cb71bb855af Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 13 Aug 2006 20:44:01 +0000 Subject: Add Auto-Submitted header in generated mail as per RFC 3834. OK henning@, ckuethe@, krw@, ian@. From Tamas TEVESZ. --- usr.sbin/cron/atrun.c | 5 +++-- usr.sbin/cron/do_command.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/cron/atrun.c b/usr.sbin/cron/atrun.c index 34c4b54f5bb..a9b28ee335c 100644 --- a/usr.sbin/cron/atrun.c +++ b/usr.sbin/cron/atrun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atrun.c,v 1.14 2005/01/30 20:45:58 millert Exp $ */ +/* $OpenBSD: atrun.c,v 1.15 2006/08/13 20:44:00 millert Exp $ */ /* * Copyright (c) 2002-2003 Todd C. Miller @@ -21,7 +21,7 @@ */ #if !defined(lint) && !defined(LINT) -static const char rcsid[] = "$OpenBSD: atrun.c,v 1.14 2005/01/30 20:45:58 millert Exp $"; +static const char rcsid[] = "$OpenBSD: atrun.c,v 1.15 2006/08/13 20:44:00 millert Exp $"; #endif #include "cron.h" @@ -551,6 +551,7 @@ run_job(atjob *job, char *atfile) fprintf(mail, "From: %s (Atrun Service)\n", pw->pw_name); fprintf(mail, "To: %s\n", mailto); fprintf(mail, "Subject: Output from \"at\" job\n"); + fprintf(mail, "Auto-Submitted: auto-generated\n"); #ifdef MAIL_DATE fprintf(mail, "Date: %s\n", arpadate(&StartTime)); #endif /*MAIL_DATE*/ diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c index 970f7b36815..602dc151d7a 100644 --- a/usr.sbin/cron/do_command.c +++ b/usr.sbin/cron/do_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: do_command.c,v 1.29 2004/06/17 22:11:55 millert Exp $ */ +/* $OpenBSD: do_command.c,v 1.30 2006/08/13 20:44:00 millert Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -22,7 +22,7 @@ */ #if !defined(lint) && !defined(LINT) -static char const rcsid[] = "$OpenBSD: do_command.c,v 1.29 2004/06/17 22:11:55 millert Exp $"; +static char const rcsid[] = "$OpenBSD: do_command.c,v 1.30 2006/08/13 20:44:00 millert Exp $"; #endif #include "cron.h" @@ -416,6 +416,7 @@ child_process(entry *e, user *u) { fprintf(mail, "Subject: Cron <%s@%s> %s\n", usernm, first_word(hostname, "."), e->cmd); + fprintf(mail, "Auto-Submitted: auto-generated\n"); #ifdef MAIL_DATE fprintf(mail, "Date: %s\n", arpadate(&StartTime)); -- cgit v1.2.3