.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.if !\nF .nr F 0
.if \nF>0 \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    if !\nF==2 \{\
.        nr % 0
.        nr F 2
.    \}
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "NEWS.DAILY 8"
.TH NEWS.DAILY 8 "2015-09-12" "INN 2.6.2" "InterNetNews Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
news.daily \- Perform daily Usenet maintenance tasks
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBnews.daily\fR [\fBdelayrm\fR] [\fBexpctl\fR=\fIpath\fR] [\fBexpdir\fR=\fIpath\fR]
[\fBexpireover\fR] [\fBexpireoverflags\fR=\fIargs\fR] [\fBflags\fR=\fIargs\fR]
[\fBlowmark\fR] [\fBmailto\fR=\fIaddress\fR] [\fBnoexpire\fR] [\fBnoexpireover\fR]
[\fBnoexplog\fR] [\fBnologs\fR] [\fBnomail\fR] [\fBnoprocbatch\fR] [\fBnorenumber\fR]
[\fBnorm\fR] [\fBnorotate\fR] [\fBnostat\fR] [\fBnotdaily\fR] [\fBpostexec\fR=\fIprogram\fR]
[\fBprocbatchdir\fR=\fIpath\fR] [\fBtmpdir\fR=\fIpath\fR] [\fI/path/to/a/program\fR]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBnews.daily\fR performs a number of important Usenet administrative functions.
This includes:
.IP "\(bu" 2
producing a status report with \fBinnstat\fR;
.IP "\(bu" 2
removing old news articles (with \fBexpirerm\fR if the \fBdelayrm\fR keyword
is specified);
.IP "\(bu" 2
purging the overview database with \fBexpireover\fR if the corresponding eponym
keyword is specified;
.IP "\(bu" 2
processing log files and rotating the archived log files with \fBscanlogs\fR;
.IP "\(bu" 2
processing \fBinnfeed\fR dropped files with \fBprocbatch\fR;
.IP "\(bu" 2
renumbering the \fIactive\fR file with \fBctlinnd\fR;
.IP "\(bu" 2
rebuilding the \fIhistory\fR file with \fBexpire\fR;
.IP "\(bu" 2
removing any old socket files found in the \fIpathrun\fR directory;
.IP "\(bu" 2
collecting all the output and mailing it.
.PP
Please note that this program should be run under the news administrator's
account (usually \f(CW\*(C`news\*(C'\fR), not as root.  By default, \fBnews.daily\fR
performs all of its functions and mails the output to the news administrator,
which is the user specified with \fB\-\-with\-news\-master\fR at configure time
(it is \f(CW\*(C`usenet\*(C'\fR by default).  You can also change this behaviour with
the \fBmailto\fR keyword.
.PP
By specifying keywords on the command line, it is possible to modify the
functions performed, as well as change the arguments given to \fIexpire\fR\|(8) and
\&\fIexpireover\fR\|(8).  \fBnews.daily\fR should be run once a day, typically out of \fIcron\fR\|(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:
.PP
.Vb 1
\&    0 3 * * * <pathbin in inn.conf>/news.daily expireover lowmark
.Ve
.PP
If you're using any non-CNFS storage methods, add the \fBdelayrm\fR keyword
to the above option list for \fBnews.daily\fR.
.PP
It may be run more often, but such invocations should at least use the
\&\fBnorotate\fR keyword (or perhaps the \fBnotdaily\fR keyword) to prevent the
log files from being processed and rotated too fast.  The \fIshlock\fR\|(1) program
is used to prevent simultaneous executions.
.PP
The program specified by the given path \fI/path/to/a/program\fR is executed
just before any expiration is done.  A typical use is to specify an alternate
expiration program and use the \fBnoexpire\fR keyword.  Multiple programs may
be specified; they will be invoked in order.
.SH "KEYWORDS"
.IX Header "KEYWORDS"
The following keywords may be used:
.IP "\fBdelayrm\fR" 4
.IX Item "delayrm"
This uses the \fB\-z\fR flag when invoking \fBexpire\fR and \fBexpireover\fR.  The names
of articles to be removed are written to a temporary file, and then renamed
after expiration by calling \fBexpirerm\fR which in turn calls \fBfastrm\fR.
.IP "\fBexpctl\fR=\fIpath\fR" 4
.IX Item "expctl=path"
Specify the file to use as the \fIexpire.ctl\fR file for \fBexpire\fR.
.IP "\fBexpdir\fR=\fIpath\fR" 4
.IX Item "expdir=path"
By default, \fBexpire\fR builds the new \fIhistory\fR 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 \fB\-d\fR flag to \fBexpire\fR), which will then
be moved to the right location when finished.
.IP "\fBexpireover\fR" 4
.IX Item "expireover"
The \fBexpireover\fR program is called after expiration to purge the overview
database.  If no overview data is created, the \fBexpireover\fR keyword is not
needed.  This is the case when the server runs only for feeders (no reader).
By default, \fBexpireover\fR is not called by \fBnews.daily\fR.
.IP "\fBexpireoverflags\fR=\fIargs\fR" 4
.IX Item "expireoverflags=args"
If the \fBexpireover\fR keyword is used, this keyword may be used to specify
the flags to be passed to \fBexpireover\fR.  If the \fBdelayrm\fR keyword is used, then
the default value is \fB\-z\fR and the list of deleted files; otherwise, the default
value is \fB\-s\fR.
.IP "\fBflags\fR=\fIargs\fR" 4
.IX Item "flags=args"
By default, \fBexpire\fR is invoked with argument \fB\-v1\fR.  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 \fBnoexpire\fR keyword
is used.
.IP "\fBlowmark\fR" 4
.IX Item "lowmark"
If the \fBlowmark\fR keyword is used, \f(CW\*(C`ctlinnd lowmark\*(C'\fR is used for
renumbering \fIactive\fR.  Normal \f(CW\*(C`ctlinnd renumber\*(C'\fR operation will take long
time.  With the \fBlowmark\fR keyword, this will take less time.  If the \fBlowmark\fR
keyword is used, the \fBnorenumber\fR keyword is not needed since \fBnews.daily\fR specifies
it implicitly.
.Sp
If the \fBlowmark\fR keyword is given to \fBnews.daily\fR, then the
\&\fBexpireover\fR keyword must also be given; otherwise, that kind of
renumbering will not be taken into account.
.IP "\fBmailto\fR=\fIaddress\fR" 4
.IX Item "mailto=address"
By default, \fBnews.daily\fR mails the report to the newsmaster address specified
with \fB\-\-with\-news\-master\fR at configure time.  The \fBmailto\fR keyword can specify
a different address to which to mail the report.  Note that using this keyword
has no effect if the \fBnomail\fR keyword is also specified.
.IP "\fBnoexpire\fR" 4
.IX Item "noexpire"
By default, \fBexpire\fR is invoked to remove old news articles.  Using this keyword disables
this function.
.IP "\fBnoexpireover\fR" 4
.IX Item "noexpireover"
By default, \fBexpireover\fR is invoked to remove old overview database
if \fIenableoverview\fR is set in \fIinn.conf\fR.  Using this keyword
disables this function.
.IP "\fBnoexplog\fR" 4
.IX Item "noexplog"
\&\fBexpire\fR normally appends information to \fIpathlog\fR/expire.log (see \fInewslog\fR\|(5)).
Using this keyword causes the \fBexpire\fR output to be handled as part of
\&\fBnews.daily\fR's output.  It has no effect if the \fBnoexpire\fR keyword is used.
.IP "\fBnologs\fR" 4
.IX Item "nologs"
After expiration, \fBscanlogs\fR is invoked to process the log files.  Using this
keyword disables all log processing functions.
.IP "\fBnomail\fR" 4
.IX Item "nomail"
\&\fBnews.daily\fR 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.
.IP "\fBnoprocbatch\fR" 4
.IX Item "noprocbatch"
This keyword disables the run of \fBprocbatch\fR on \fBinnfeed\fR dropped files
generated in its spool directory.  These files contain a list of articles
which were not correctly sent to peers.  By default, they will be processed
and removed afterwards.
.IP "\fBnorenumber\fR" 4
.IX Item "norenumber"
This keyword disables the \f(CW\*(C`ctlinnd renumber\*(C'\fR operation.  Normally, the low water
marks for all newsgroups are reset in the \fIactive\fR file.
.IP "\fBnorm\fR" 4
.IX Item "norm"
By default, any \fBctlinnd\fR socket that has not been modified for two days will
be removed.  Using this keyword disables this function.
.IP "\fBnorotate\fR" 4
.IX Item "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 \fBnologs\fR keyword is used.  The \fBnorotate\fR keyword
is passed on to \fBscanlogs\fR if it is invoked.
.IP "\fBnostat\fR" 4
.IX Item "nostat"
This keyword disables the status report generated by \fBinnstat\fR.
Without this keyword, the status report is the first function
performed, just prior to obtaining the \fBnews.daily\fR lock.
.IP "\fBnotdaily\fR" 4
.IX Item "notdaily"
By default, \fBnews.daily\fR 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 \fBnews.daily\fR is run
in the day and the normal log files processing (and rotation) will not be done.
This keyword implies \fBnologs\fR.
.IP "\fBpostexec\fR=\fIprogram\fR" 4
.IX Item "postexec=program"
The program specified by the given path \fIprogram\fR is executed just after all expiration
is done.  Multiple programs may be specified; they will be invoked in order.
.IP "\fBprocbatchdir\fR=\fIpath\fR" 4
.IX Item "procbatchdir=path"
\&\fBnews.daily\fR tries to find the backlog directory of \fBinnfeed\fR in
\&\fIinnfeed.conf\fR.  In case several instances of \fBinnfeed\fR are running or
when its configuration file is not the default one, the \fBprocbatchdir\fR
keyword can be used to specify the path of the backlog directory.
This keyword can be used more than once in the command-line.
.IP "\fBtmpdir\fR=\fIpath\fR" 4
.IX Item "tmpdir=path"
Overrides the \fIpathtmp\fR setting in \fIinn.conf\fR by setting the environment variable
\&\f(CW$TMPDIR\fR 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"
.IX Header "HISTORY"
\&\fBnews.daily\fR and this manual page were written by Landon Curt Noll <chongo@toad.com>
and Rich \f(CW$alz\fR <rsalz@uunet.uu.net> for InterNetNews.  It was converted to \s-1POD\s0 by
Julien Elie.
.PP
\&\f(CW$Id:\fR news.daily.pod 9628 2014\-05\-14 17:22:01Z iulius $
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIactive\fR\|(5), \fIctlinnd\fR\|(8), \fIexpire\fR\|(8), \fIexpire.ctl\fR\|(5), \fIexpireover\fR\|(8), \fIexpirerm\fR\|(8), \fIfastrm\fR\|(8),
\&\fIinn.conf\fR\|(5), \fIinnstat\fR\|(8), \fInewslog\fR\|(5), \fIprocbatch\fR\|(8), \fIscanlogs\fR\|(8), \fIshlock\fR\|(1).
