new news.daily option: mailto=xxx

James Ralston qralston+ml.inn-patches at andrew.cmu.edu
Thu Jul 24 16:16:04 UTC 2008


When news.daily runs, unless the "nomail" option is used, news.daily
mails its output to the NEWSMASTER address (specified in the
innshellvars file).

However, it can be desirable to change the address to which news.daily
sends its reports: for example, you want a manager or administrative
person to see the news.daily reports, but you *don't* want that person
to see any of the other mail that is sent to the NEWSMASTER address.

The following patch adds a "mailto" option to news.daily.  If the
mailto option is supplied, and the "nomail" option is not used,
news.daily will mail its report to the address specified by the mailto
option, instead of to the NEWSMASTER address.

This patch is against revision 7940.

-- 
James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA

--- trunk/doc/man/news.daily.8.mailto	2008-07-24 12:11:32.000000000 -0400
+++ trunk/doc/man/news.daily.8	2008-07-24 12:12:21.000000000 -0400
@@ -163,6 +163,20 @@ Normally, all utilities invoked by the s
 redirected into a file.
 If the file is empty, no message is sent.
 .TP
+.IR mailto= address
+By default,
+.I news.daily
+mails the report to the
+.I NEWSMASTER
+address (specified in the
+.I innshellvars
+file.)  The
+.I mailto
+option can be specify a different address to which to mail the
+report.  (This option has no effect if the
+.I nomail
+option is specified.)
+.TP
 .I expireover
 The
 .I expireover
diff -up trunk/scripts/news.daily.in.mailto trunk/scripts/news.daily.in
--- trunk/scripts/news.daily.in.mailto	2008-07-24 12:11:30.000000000 -0400
+++ trunk/scripts/news.daily.in	2008-07-24 12:12:21.000000000 -0400
@@ -9,6 +9,7 @@
 ##	expirectl=xxx	Use xxx as expire.ctl file
 ##	flags=xxx	Pass xxx flags to expire
 ##	lowmark		Create and use a lowmark file
+##	mailto=xxx	email report to specified address instead of newsmaster
 ##	noexpire	Do not expire
 ##	noexplog	Do not log expire output
 ##	nologs		Do not scan logfiles
@@ -114,6 +115,9 @@ do
 	LOWMARKFILE=${MOST_LOGS}/expire.lowmark
 	DORENUMBER=false
 	;;
+    Xmailto=*)
+	NEWSMASTER=`expr "${I}" : 'mailto=\(.*\)'`
+	;;
     Xnotdaily)
         DAILY=false
 	DOLOGS=false



More information about the inn-patches mailing list