INN commit: trunk (8 files)

INN Commit Russ_Allbery at isc.org
Sat Aug 2 17:29:25 UTC 2008


    Date: Saturday, August 2, 2008 @ 10:29:25
  Author: iulius
Revision: 7942

Add a keyword to news.daily in order to supply another mail
address than the one set at configure time for Usenet daily reports.

Thanks to James Ralston for having added this nomail option.


Also fixed an inconsistency in available keywords (expirectl
is in fact expctl), update the documentation and rewrite
the news.daily one into POD.

Added:
  trunk/doc/pod/news.daily.pod
Modified:
  trunk/CONTRIBUTORS
  trunk/MANIFEST
  trunk/doc/man/	(properties)
  trunk/doc/pod/Makefile
  trunk/doc/pod/install.pod
  trunk/scripts/news.daily.in
Deleted:
  trunk/doc/man/news.daily.8

------------------------+
 CONTRIBUTORS           |    2 
 MANIFEST               |    1 
 doc/man/news.daily.8   |  227 ---------------------------------------------
 doc/pod/Makefile       |    3 
 doc/pod/install.pod    |    4 
 doc/pod/news.daily.pod |  234 +++++++++++++++++++++++++++++++++++++++++++++++
 scripts/news.daily.in  |   85 ++++++++---------
 7 files changed, 283 insertions(+), 273 deletions(-)

Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS	2008-08-02 17:10:27 UTC (rev 7941)
+++ CONTRIBUTORS	2008-08-02 17:29:25 UTC (rev 7942)
@@ -268,4 +268,4 @@
 Kai Gallasch, Ollivier Robert, Ivan Shmakov, Kachun Lee, Kirill Berezin,
 D. Stussy, Alan Schwartz, Shalon Wood, Nick Couchman, Jakub Bogusz,
 J. Thomas Halliley, Matija Nalis, Geraint A. Edwards, Alexander Bartolich,
-David Hlacik, Andreas Mattheiss
+David Hlacik, Andreas Mattheiss, James Ralston

Modified: MANIFEST
===================================================================
--- MANIFEST	2008-08-02 17:10:27 UTC (rev 7941)
+++ MANIFEST	2008-08-02 17:29:25 UTC (rev 7942)
@@ -295,6 +295,7 @@
 doc/pod/makehistory.pod               Master file for makehistory.8
 doc/pod/moderators.pod                Master file for moderators.5
 doc/pod/motd.news.pod                 Master file for motd.news.5
+doc/pod/news.daily.pod                Master file for news.daily.pod.8
 doc/pod/news.pod                      Master file for NEWS
 doc/pod/newsfeeds.pod                 Master file for newsfeeds.5
 doc/pod/newsgroups.pod                Master file for newsgroups.5


Property changes on: trunk/doc/man
___________________________________________________________________
Modified: svn:ignore
   - active.5
active.times.5
actsync.8
archive.8
auth_krb5.8
auth_smb.8
batcher.8
buffchan.8
buffindexed.conf.5
ckpasswd.8
control.ctl.5
convdate.1
ctlinnd.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expireover.8
fastrm.1
getlist.1
grephistory.1
ident.8
inews.1
inn.conf.5
INN__Config.3pm
innbind.8
innconfval.1
innd.8
inndf.8
innmail.1
innupgrade.8
libauth.3
libinnhist.3
list.3
mailpost.8
makehistory.8
moderators.5
motd.news.5
newsfeeds.5
newslog.5
newsgroups.5
ninpaths.8
nnrpd.8
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
pullnews.1
qio.3
radius.8
radius.conf.5
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.8
send-uucp.8
sendinpaths.8
simpleftp.1
sm.1
storage.conf.5
subscriptions.5
tally.control.8
tdx-util.8
tinyleaf.8
tst.3
uwildmat.3

   + active.5
active.times.5
actsync.8
archive.8
auth_krb5.8
auth_smb.8
batcher.8
buffchan.8
buffindexed.conf.5
ckpasswd.8
control.ctl.5
convdate.1
ctlinnd.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expireover.8
fastrm.1
getlist.1
grephistory.1
ident.8
inews.1
inn.conf.5
INN__Config.3pm
innbind.8
innconfval.1
innd.8
inndf.8
innmail.1
innupgrade.8
libauth.3
libinnhist.3
list.3
mailpost.8
makehistory.8
moderators.5
motd.news.5
newsfeeds.5
news.daily.8
newslog.5
newsgroups.5
ninpaths.8
nnrpd.8
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
pullnews.1
qio.3
radius.8
radius.conf.5
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.8
send-uucp.8
sendinpaths.8
simpleftp.1
sm.1
storage.conf.5
subscriptions.5
tally.control.8
tdx-util.8
tinyleaf.8
tst.3
uwildmat.3


Deleted: doc/man/news.daily.8
===================================================================
--- doc/man/news.daily.8	2008-08-02 17:10:27 UTC (rev 7941)
+++ doc/man/news.daily.8	2008-08-02 17:29:25 UTC (rev 7942)
@@ -1,227 +0,0 @@
-.TH NEWS.DAILY 8
-.SH NAME
-news.daily \- do regular Usenet system administration
-.SH SYNOPSIS
-.B news.daily
-[
-.B keyword...
-]
-
-.SH DESCRIPTION
-.I News.daily
-performs a number of important Usenet administrative functions.
-This includes producing a status report, removing old news articles, 
-processing log files, rotating the archived log files, renumbering the
-active file, 
-removing any old socket files found in the
-.I <pathrun in inn.conf>
-directory, and collecting the output.
-.I "This program should be run under the news administrator's id, not as root."
-.PP
-By default, 
-.I news.daily
-performs all of its functions and mails the output to the news administrator,
-.IR <USER\ specified\ with\ \-\-with\-news\-master\ at\ configure> .
-By specifying ``keywords'' on the command line, it is possible to
-modify the functions performed, as well as change the arguments given to
-.IR expire (8)
-and
-.IR expireover (8).
-.PP
-.I News.daily
-should be run once a day, typically out of
-.IR cron (8).
-It may be run more often, but such invocations should at least use the
-\&``norotate'' keyword (or perhaps the \&``notdaily'' keyword) to
-prevent the log files from being processed and rotated too fast.
-.PP
-The
-.IR shlock (1)
-program is used to prevent simultaneous executions.
-.SH "KEYWORDS"
-.PP
-The following keywords may be used:
-.TP
-.I delayrm
-This uses the ``\fB\-z\fP'' flag when invoking
-.I expire
-and
-.IR expireover .
-The names of articles to be removed are written to a temporary file, and
-then renamed after expiration by calling
-.IR expirerm (8).
-.TP
-.IR expctl= path
-Specify the file to use as the
-.IR expire.ctl (5)
-file for
-.IR expire .
-.TP
-.IR expdir= path
-By default,
-.I expire
-builds the new
-.IR history (5)
-file and database in the same directory as the current files.
-Using this keyword specifies a different local to build the new files
-(by passing the ``\fB\-d\fP'' flag to
-.IR expire ),
-which will then be moved to the right location when finished.
-.TP
-.I nostat
-This keyword disables the status report generated by
-.I innstat
-(see
-.IR innstat (8)).
-Without this keyword, the status report is the first function performed,
-just prior to obtaining the
-.I news.daily
-lock.
-.TP
-.I notdaily
-By default 
-.I news.daily
-expects to be run only once a day, and it does
-various things (like rotating logs) that normally should only be done on
-daily basis. Use this keyword any extra times
-.I news.daily
-is run in the
-day and the normal logfile processing (and rotation) will not be done.
-.TP
-.I noexpire
-By default,
-.I expire
-is invoked to remove old news articles.
-Using this keyword disables this function.
-.TP
-.I noexpireover
-By default,
-.I expireover
-is invoked to remove old overview database, if
-.I enableoverview
-is set in
-.IR inn.conf .
-Using this keyword disables this function.
-.TP
-.I noexplog
-.I Expire
-normally appends information to
-.I <pathlog in inn.conf>/expire.log
-(see
-.IR newslog (5)).
-Using this keyword causes the
-.I expire
-output to be handled as part of 
-.IR news.daily 's
-output.
-It has no effect if the ``noexpire'' keyword is used.
-.TP
-.IR flags= "'args\ for\ expire'"
-By default, 
-.I expire
-is invoked with argument ``\-v1''.
-Using this keyword changes the arguments to those specified.
-Be careful to use quotes if multiple arguments are needed.
-This keyword has no effect if the ``noexpire'' keyword is used.
-.TP
-.I nologs
-After expiration,
-.IR scanlogs (8)
-is invoked to process the log files.
-Using this keyword disables all log processing functions.
-.TP
-.I norotate
-By default, log processing includes rotating and cleaning out log files.
-Using this keyword disables the rotating and cleaning aspect of the log
-processing: the logs files are only scanned for information and no contents
-are altered.
-.IP
-This keyword has no effect if the ``nologs'' keyword is used.
-The ``norotate'' keyword is passed on to
-.I scanlogs
-if it is invoked.
-.TP
-.I norenumber
-This keyword disables the
-.IR ctlinnd (8)
-renumber operation.
-Normally, the low-water marks for all newsgroups (see
-.IR active (5))
-are reset.
-.TP
-.I norm
-By default, any socket
-.I ctlinnd
-socket that has not been modified for two days will be removed.
-Using this keyword disables this function.
-.TP
-.I nomail
-.I News.daily
-normally sends a mail message containing the results to the administrator.
-Using this keyword causes this message to be sent to stdout and stderr instead.
-Normally, all utilities invoked by the script have their stdout and stderr
-redirected into a file.
-If the file is empty, no message is sent.
-.TP
-.I expireover
-The
-.I expireover
-program is called after expiration to purge the overview databases.
-If no overview data is created, the ``expireover''
-keyword is not needed.  This is the case that the server runs only for
-feeder(no reader).
-.TP
-.IR expireoverflags= "'args\ for\ expireover'"
-If the ``expireover'' keyword is used, this keyword may be used to specify
-the flags to be passed to
-.IR expireover .
-If the ``delayrm'' keyword is used, then the default value is ``\-z''
-and the list of deleted files; otherwise, the default value is ``\-s''.
-.TP
-.I /full/path
-The program specified by the given path is executed just before any
-expiration is done.
-A typical use is to specify an alternate expiration program and use the
-\&``noexpire'' keyword.
-Multiple programs may be specified; they will be invoked in order.
-.TP
-.IR postexec= "'post executed program'"
-The program specified by the given path is executed just after all
-expiration is done.
-Multiple programs may be specified; they will be invoked in order.
-.TP
-.I lowmark
-If the ``lowmark'' keyword is used, 
-.IR ctlinnd (8)
-lowmark is used for renumbering
-.IR active .
-Normal
-.IR ctlinnd (8)
-renumber operation will take long time.  With ``lowmark'' keyword this will
-take less time.
-If the ``lowmark'' keyword is used,
-\&``norenumber'' keyword is not needed, since
-.I news.daily
-specifies it implicitly.
-.TP
-.IR tmpdir= path
-Sets the environment variable TMPDIR to the specified path.
-Various parts of the expire process, such as sort, will then use this
-path as the directory for temporary files.
-.SH HISTORY
-.I News.daily
-and this manual page written by Landon Curt Noll <chongo at toad.com> and
-Rich $alz <rsalz at uunet.uu.net>.
-.de R$
-This is revision \\$3, dated \\$4.
-..
-.R$ $Id$
-.SH "SEE ALSO"
-active(5),
-ctlinnd(8), 
-expire(8),
-fastrm(8),
-inn.conf(5),
-newslog(5),
-innwatch.ctl(5),
-shlock(1).

Modified: doc/pod/Makefile
===================================================================
--- doc/pod/Makefile	2008-08-02 17:10:27 UTC (rev 7941)
+++ doc/pod/Makefile	2008-08-02 17:29:25 UTC (rev 7942)
@@ -32,7 +32,7 @@
 	../man/domain.8 \
 	../man/expireover.8 ../man/ident.8 ../man/innd.8 ../man/inndf.8 \
 	../man/nnrpd.8 ../man/innbind.8 ../man/innupgrade.8 \
-	../man/makehistory.8 ../man/ninpaths.8 \
+	../man/makehistory.8 ../man/news.daily.8 ../man/ninpaths.8 \
 	../man/ovdb_init.8 ../man/ovdb_monitor.8 ../man/ovdb_server.8 \
 	../man/ovdb_stat.8 ../man/overchan.8 ../man/radius.8 \
 	../man/rc.news.8 ../man/scanlogs.8 ../man/sendinpaths.8 \
@@ -114,6 +114,7 @@
 ../man/inndf.8:		inndf.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/innupgrade.8:	innupgrade.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/makehistory.8:	makehistory.pod		; $(POD2MAN) -s 8 $? > $@
+../man/news.daily.8:	news.daily.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/ninpaths.8:	ninpaths.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/nnrpd.8:		nnrpd.pod		; $(POD2MAN) -s 8 $? > $@
 ../man/ovdb_init.8:	ovdb_init.pod		; $(POD2MAN) -s 8 $? > $@

Modified: doc/pod/install.pod
===================================================================
--- doc/pod/install.pod	2008-08-02 17:10:27 UTC (rev 7941)
+++ doc/pod/install.pod	2008-08-02 17:29:25 UTC (rev 7942)
@@ -209,7 +209,9 @@
 
 By default, INN sends reports to the user C<usenet>.  This account isn't
 used for any other purposes.  You can change it with the
-B<--with-news-master> option to configure (see below).
+B<--with-news-master> option to configure (see below).  There is also
+the I<mailto> keyword which can be given to B<news.daily> in order to
+modify the mail address to which these reports are sent.
 
 WARNING:  By default, INN installs various configuration files as
 group-writeable, and in general INN is not hardened from a security

Added: doc/pod/news.daily.pod
===================================================================
--- doc/pod/news.daily.pod	                        (rev 0)
+++ doc/pod/news.daily.pod	2008-08-02 17:29:25 UTC (rev 7942)
@@ -0,0 +1,234 @@
+=head1 NAME
+
+news.daily - Perform daily Usenet maintenance tasks
+
+=head1 SYNOPSIS
+
+B<news.daily> [B<delayrm>] [B<expctl>=I<path>] [B<expdir>=I<path>]
+[B<expireover>] [B<expireoverflags>=I<args>] [B<flags>=I<args>]
+[B<lowmark>] [B<mailto>=I<address>] [B<noexpire>] [B<noexpireover>]
+[B<noexplog>] [B<nologs>] [B<nomail>] [B<norenumber>] [B<norm>]
+[B<norotate>] [B<nostat>] [B<notdaily>] [B<postexec>=I<program>]
+[B<tmpdir>=I<path>] [I</path/to/a/program>]
+
+=head1 DESCRIPTION
+
+B<news.daily> performs a number of important Usenet administrative functions.
+This includes:
+
+=over 2
+
+=item *
+
+producing a status report with B<innstat>;
+
+=item *
+
+removing old news articles (with B<expirerm> if the B<delayrm> keyword
+is specified);
+
+=item *
+
+purging the overview database with B<expireover> if the corresponding eponym
+keyword is specified;
+
+=item *
+
+processing log files and rotating the archived log files with B<scanlogs>;
+
+=item *
+
+renumbering the F<active> file with B<ctlinnd>;
+
+=item *
+
+rebuilding the F<history> file with B<expire>;
+
+=item *
+
+removing any old socket files found in the I<pathrun> directory;
+
+=item *
+
+collecting all the output and mailing it.
+
+=back
+
+Please note that this program should be run under the news administrator's
+account (usually C<news>), not as root.  By default, B<news.daily>
+performs all of its functions and mails the output to the news administrator,
+which is the user specified with B<--with-news-master> at configure time
+(it is C<usenet> by default).  You can also change this behaviour with
+the B<mailto> keyword.
+
+By specifying keywords on the command line, it is possible to modify the
+functions performed, as well as change the arguments given to expire(8) and
+expireover(8).  B<news.daily> should be run once a day, typically out of cron(8).
+Since it will slow the server down while it is running, it should be run
+during periods of low server usage, such as in the middle of the night.
+To run it at 3am, for example, add the following entry to the news user's
+crontab file:
+
+    0 3 * * * /usr/local/news/bin/news.daily expireover lowmark
+
+If you're using any non-CNFS storage methods, add the B<delayrm> keyword
+to the above option list for B<news.daily>.
+
+It may be run more often, but such invocations should at least use the
+B<norotate> keyword (or perhaps the B<notdaily> keyword) to prevent the
+log files from being processed and rotated too fast.  The shlock(1) program
+is used to prevent simultaneous executions.
+
+The program specified by the given path I</path/to/a/program> is executed
+just before any expiration is done.  A typical use is to specify an alternate
+expiration program and use the B<noexpire> keyword.  Multiple programs may
+be specified; they will be invoked in order.
+
+=head1 KEYWORDS
+
+The following keywords may be used:
+
+=over 4
+
+=item B<delayrm>
+
+This uses the B<-z> flag when invoking B<expire> and B<expireover>.  The names
+of articles to be removed are written to a temporary file, and then renamed
+after expiration by calling B<expirerm> which in turn calls B<fastrm>.
+
+=item B<expctl>=I<path>
+
+Specify the file to use as the F<expire.ctl> file for B<expire>.
+
+=item B<expdir>=I<path>
+
+By default, B<expire> builds the new F<history> file and database in the same
+directory as the current files.  Using this keyword specifies a different location
+to build the new files (by passing the B<-d> flag to B<expire>), which will then
+be moved to the right location when finished.
+
+=item B<expireover>
+
+The B<expireover> program is called after expiration to purge the overview
+database.  If no overview data is created, the B<expireover> keyword is not
+needed.  This is the case when the server runs only for feeders (no reader).
+By default, B<expireover> is not called by B<news.daily>.
+
+=item B<expireoverflags>=I<args>
+
+If the B<expireover> keyword is used, this keyword may be used to specify
+the flags to be passed to B<expireover>.  If the B<delayrm> keyword is used, then
+the default value is B<-z> and the list of deleted files; otherwise, the default
+value is B<-s>.
+
+=item B<flags>=I<args>
+
+By default, B<expire> is invoked with argument B<-v1>.  Using this keyword
+changes the arguments to those specified.  Be careful to use quotes if multiple
+arguments are needed.  This keyword has no effect if the B<noexpire> keyword
+is used.
+
+=item B<lowmark>
+
+If the B<lowmark> keyword is used, C<ctlinnd lowmark> is used for
+renumbering F<active>.  Normal C<ctlinnd renumber> operation will take long
+time.  With the B<lowmark> keyword, this will take less time.  If the B<lowmark>
+keyword is used, the B<norenumber> keyword is not needed since B<news.daily> specifies
+it implicitly.
+
+=item B<mailto>=I<address>
+
+By default, B<news.daily> mails the report to the newsmaster address specified
+with B<--with-news-master> at configure time.  The B<mailto> keyword can specify
+a different address to which to mail the report.  Note that using this keyword
+has no effect if the B<nomail> keyword is also specified.
+
+=item B<noexpire>
+
+By default, B<expire> is invoked to remove old news articles.  Using this keyword disables
+this function.
+
+=item B<noexpireover>
+
+By default, B<expireover> is invoked to remove old overview database
+if I<enableoverview> is set in F<inn.conf>.  Using this keyword
+disables this function.
+
+=item B<noexplog>
+
+B<expire> normally appends information to I<pathlog>/expire.log (see newslog(5)).
+Using this keyword causes the B<expire> output to be handled as part of
+B<news.daily>'s output.  It has no effect if the B<noexpire> keyword is used.
+
+=item B<nologs>
+
+After expiration, B<scanlogs> is invoked to process the log files.  Using this
+keyword disables all log processing functions.
+
+=item B<nomail>
+
+B<news.daily> normally sends a mail message containing the results to the
+administrator.  Using this keyword causes this message to be sent to stdout
+and stderr instead.  Normally, all utilities invoked by the script have
+their stdout and stderr redirected into a file.
+If the file is empty, no message is sent.
+
+=item B<norenumber>
+
+This keyword disables the C<ctlinnd renumber> operation.  Normally, the low-water
+marks for all newsgroups are reset in the F<active> file.
+
+=item B<norm>
+
+By default, any B<ctlinnd> socket that has not been modified for two days will
+be removed.  Using this keyword disables this function.
+
+=item B<norotate>
+
+By default, log processing includes rotating and cleaning out log files.  Using
+this keyword disables the rotating and cleaning aspect of the log processing:  the
+logs files are only scanned for information and no contents are altered.  This
+keyword has no effect if the B<nologs> keyword is used.  The B<norotate> keyword
+is passed on to B<scanlogs> if it is invoked.
+
+=item B<nostat>
+
+This keyword disables the status report generated by B<innstat>.
+Without this keyword, the status report is the first function
+performed, just prior to obtaining the B<news.daily> lock.
+
+=item B<notdaily>
+
+By default, B<news.daily> expects to be run only once a day, and it does
+various things (like rotating logs) that normally should only be done
+on daily basis.  Use this keyword any extra times B<news.daily> is run
+in the day and the normal log files processing (and rotation) will not be done.
+This keyword implies B<nologs>.
+
+=item B<postexec>=I<program>
+
+The program specified by the given path I<program> is executed just after all expiration
+is done.  Multiple programs may be specified; they will be invoked in order.
+
+=item B<tmpdir>=I<path>
+
+Overrides the I<pathtmp> setting in F<inn.conf> by setting the environment variable
+C<$TMPDIR> to the specified path.  Various parts of the expire process, such as sort,
+will then use this path as the directory for temporary files.
+
+=back
+
+=head1 HISTORY
+
+B<news.daily> and this manual page were written by Landon Curt Noll <chongo at toad.com>
+and Rich $alz <rsalz at uunet.uu.net> for InterNetNews.  It was converted to POD by
+Julien Elie <julien at trigofacile.com>.
+
+$Id$
+
+=head1 SEE ALSO
+
+active(5), ctlinnd(8), expire(8), expire.ctl(5), expireover(8), expirerm(8), fastrm(8),
+inn.conf(5), innstat(8), newslog(5), scanlogs(8), shlock(1).
+
+=cut


Property changes on: trunk/doc/pod/news.daily.pod
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Modified: scripts/news.daily.in
===================================================================
--- scripts/news.daily.in	2008-08-02 17:10:27 UTC (rev 7941)
+++ scripts/news.daily.in	2008-08-02 17:29:25 UTC (rev 7942)
@@ -1,25 +1,30 @@
 #! /bin/sh
 # fixscript will replace this line with code to load innshellvars
 
-##  $Revision$
+##  $Id$
 ##  Daily news maintenance.
 ##  Optional arguments:
-##	expdir=xxx	Directory in which to build new history file
-##	tmpdir=xxx	Working directory for `sort' and such
-##	expirectl=xxx	Use xxx as expire.ctl file
-##	flags=xxx	Pass xxx flags to expire
-##	lowmark		Create and use a lowmark file
-##	noexpire	Do not expire
-##	noexplog	Do not log expire output
-##	nologs		Do not scan logfiles
-##	nomail		Do not capture and mail output
-##	norenumber	Do not renumber the active file
-##	norm		Do not remove certain old files
-##	norotate	Do not rotate logfiles
-##	nostat		Do not run innstat
-##	notdaily        Not a daily run, and therefore implies nologs.
-##	delayrm		Delay unlink files, then do it quicker (expire -z)
-##	/full/path	Path to a program to run before expiring
+##      delayrm              Delay unlink files, then do it quicker (expire -z)
+##      expctl=xxx           Use xxx as expire.ctl file
+##      expdir=xxx           Directory in which to build new history file
+##      expireover           Runs expireover after expiration
+##      expireoverflags=xxx  Pass xxx flags to expireover
+##      flags=xxx            Pass xxx flags to expire
+##      lowmark              Create and use a lowmark file
+##      mailto=xxx           E-mail address to which to send the report instead of newsmaster
+##      noexpire             Do not expire
+##      noexpireover         Do not expireover
+##      noexplog             Do not log expire output
+##      nologs               Do not scan log files
+##      nomail               Do not capture and mail output
+##      norenumber           Do not renumber the active file
+##      norm                 Do not remove certain old files
+##      norotate             Do not rotate logfiles
+##      nostat               Do not run innstat
+##      notdaily             Not a daily run, and therefore implies nologs
+##      postexec=xxx         Path to a program to run after expiring
+##      tmpdir=xxx           Working directory for `sort' and such
+##      /full/path           Path to a program to run before expiring
 
 EXPLOG=${MOST_LOGS}/expire.log
 INNSTAT=${PATHBIN}/innstat
@@ -114,6 +119,9 @@
 	LOWMARKFILE=${MOST_LOGS}/expire.lowmark
 	DORENUMBER=false
 	;;
+    Xmailto=*)
+        NEWSMASTER=`expr "${I}" : 'mailto=\(.*\)'`
+        ;;
     Xnotdaily)
         DAILY=false
 	DOLOGS=false
@@ -135,9 +143,6 @@
 	DOMAIL=false
 	MAIL="cut -c 1-1022 | ${SED} -e 's/^~/~~/'"
 	;;
-    Xnonn)
-	# Ignore this.
-	;;
     Xnorenumber)
 	DORENUMBER=false
 	;;
@@ -164,21 +169,17 @@
     esac
 done
 
-##
-## Setup mail subject and command
-##
+##  Setup mail subject and command.
 if ${DAILY} ; then
    MAILSUBJ="${HOSTNAME} Daily Usenet report for ${DATE}"
 else
-   MAILSUBJ="${HOSTNAME} intermediate usenet report for ${DATE}"
+   MAILSUBJ="${HOSTNAME} intermediate Usenet report for ${DATE}"
 fi
 MAIL="cut -c 1-1022 | ${SED} -e 's/^~/~~/' | \
     ${MAILCMD} -s '$MAILSUBJ' ${NEWSMASTER}"
 
-#
-#	Sanity check. Shouldn't we just bail out here with an error
-#	instead of trying to patch things up?
-#
+##  Sanity check.  Shouldn't we just bail out here with an error
+##  instead of trying to patch things up?
 ${DOEXPIRE} || {
     EXPDIR=
     RMFILE=
@@ -243,7 +244,7 @@
     scanlogs ${SCANARG}
 }
 
-# group-based expiry (delete expired overview first)
+##  Group-based expiry (delete expired overview first).
 if [ ${DOGROUPBASEEXPIRY} = true -a ${DOEXPIREOVER} = true ] ; then
     if ${DOEXPLOG}; then
 	echo "${EXPIREOVER} start `date`: (${EXPIREOVERFLAGS})" >>${EXPLOG}
@@ -280,16 +281,16 @@
 ##  The heart of the matter:  prologs, expire, epilogs.
 if ${DOEXPIRE} ; then
 
-    ## Wait to be fairly certain innwatch is not in the middle of a pass
-    ## Since we're locked, innwatch will pause now till we're done
+    ##  Wait to be fairly certain innwatch is not in the middle of a pass.
+    ##  Since we're locked, innwatch will pause now till we're done.
     sleep 30
 
     ##  See if we're throttled for lack of space.
     SERVERMODE=`ctlinnd -t $TOUT mode 2>/dev/null | ${SED} 1q`
     case "${SERVERMODE}" in
     'Server paused'*'[innwatch:'*)
-	## If paused, by innwatch, then turn pause into throttle
-	## as we're going to stay that way for a while now
+	##  If paused, by innwatch, then turn pause into throttle
+	##  as we're going to stay that way for a while now.
 	ctlinnd -t $TOUT -s throttle \
 	    "`expr \"${SERVERMODE}\" : 'Server paused \(.*\)'`" || {
 	    ( echo "$0: Cannot throttle while innwatch paused";
@@ -324,10 +325,8 @@
 	}
     fi
 
-    #
-    #  Get rid of an old expire RMFILE since news.daily locks itself and
-    #  we would not get here if another instance were still running.
-    #        
+    ## Get rid of an old expire RMFILE since news.daily locks itself and
+    ## we would not get here if another instance were still running.       
     if [ -n "${RMFILE}" ] ; then
         rm -f ${RMFILE}
     fi
@@ -397,12 +396,12 @@
 esac
 
 ##  Release the lock now, everything below this must be able to withstand
-##  simultaneous news.daily's running.   We do this so innwatch can start
+##  simultaneous news.daily's running.  We do this so innwatch can start
 ##  monitoring again asap after the expire is done -- removing the
 ##  articles isn't critical, nor is the renumber.
 rm ${LOCK}
 
-## Remove the articles that are supposed to go
+##  Remove the articles that are supposed to go.
 if [ ${DOEXPIRE} = true -a ${DOGROUPBASEEXPIRY} != true ] ; then
     test -n "${RMFILE}" -a -s "${RMFILE}" && {
 	mv ${RMFILE} ${RMFILE}.$$ && RMFILE=${RMFILE}.$$
@@ -435,7 +434,7 @@
 	    mv ${LOWMARKFILE} ${MOST_LOGS}/expire.lastlowmark
 	}
     }
-    # expire overview lines for files we just removed
+    ##  Expire overview lines for files we just removed.
     if ${DOEXPIREOVER}; then
 	if ${DOEXPLOG}; then
 	    echo "${EXPIREOVER} start `date`" >>${EXPLOG}
@@ -455,7 +454,7 @@
 	}
     fi
 fi
-# in case noexpire expireover
+##  In case noexpire expireover.
 if ${DOEXPIREOVER}; then
     if ${DOEXPLOG}; then
 	echo "${EXPIREOVER} start `date`" >>${EXPLOG}
@@ -488,7 +487,7 @@
     fi
 fi
 
-##  Display expire log messages
+##  Display expire log messages.
 if ${DOMAIL} ; then
     if [ -s ${EXPLOG} ] ; then
 	    echo Expire messages:
@@ -507,7 +506,7 @@
 
 ##  Mail the report.
 if ${DOMAIL} ; then
-    # Stop using the temp file, and mail captured output.
+    ##  Stop using the temp file, and mail captured output.
     exec 1>&3 2>&1 3>&-
     MAIL="${MAILCMD} -s \"${MAILSUBJ}\" ${NEWSMASTER}"
     test -s ${TEMP} && cat ${TEMP} | ${SED} -e 's/^~/~~/' | eval ${MAIL}



More information about the inn-committers mailing list