.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DELAYER 1" .TH DELAYER 1 2024-04-01 "INN 2.7.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 delayer \- A pipe to delay line\-based input by a given time .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fIsome-program\fR | \fBdelayer\fR [\fB\-\-\fR[\fBno\-\fR]\fBbuffered\fR] [\fB\-\-delay\fR \&\fIseconds\fR] [\fB\-\-store\fR \fIfilename\fR] \fB\-\-\fR \fIsome-other-program\fR [\fIargs\fR ...] .PP Legacy calling convention: .PP \&\fIsome-program\fR | \fBdelayer\fR \fIseconds\fR \fIsome-other-program\fR [\fIargs\fR ...] .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBdelayer\fR program implements a delaying pipe. Lines sent to the standard input of the process are spooled, and only printed to the standard input of \&\fIsome-other-program\fR after a certain delay time has passed. .PP The main use case is for a news feed that deliberately should not distribute articles as soon as possible. One reason is giving cancel control articles and NoCeM messages time to arrive so that \fBinnd\fR remembers the Message-IDs of those cancelled articles before they actually arrive. It permits cancelling articles before they are locally stored and spread to other peers. The delay can be set up for outgoing feeds wanting that or, even better for not slowing the propagation of articles, internally between a frontend instance of \fBinnd\fR receiving the articles from all your peers and another local instance of \&\fBinnd\fR fed by your frontend with a delay except for cancels and NoCeM articles. .PP Another use case is using a link only as a backup. .SH CONFIGURATION .IX Header "CONFIGURATION" The steps to set up a delayed feed using \fBdelayer\fR and \fBinnfeed\fR are: .IP \(bu 4 Choose a name for that feed, e.g. \f(CW\*(C`innfeed\-delayed\*(C'\fR. .IP \(bu 4 In \fIpathetc\fR, copy \fIinnfeed.conf\fR to \fIinnfeed\-delayed.conf\fR. .IP \(bu 4 Edit \fIinnfeed\-delayed.conf\fR in \fIpathetc\fR, and change the occurrences of \&\f(CW\*(C`innfeed\*(C'\fR to \f(CW\*(C`innfeed\-delayed\*(C'\fR, typically in the \fIlog-file\fR, \fIpid-file\fR and \fIstatus-file\fR parameters. If these parameters are not set, you should explicitly set them in \fIinnfeed\-delayed.conf\fR so that their default values do not conflict with a running instance in parallel of a real-time feed using \&\fBinnfeed\fR. For instance: .Sp .Vb 3 \& log\-file: innfeed\-delayed.log \& pid\-file: innfeed\-delayed.pid \& status\-file: innfeed\-delayed.status .Ve .Sp Using the same value for \fIbacklog-directory\fR in both \fIinnfeed.conf\fR and \&\fIinnfeed\-delayed.conf\fR is fine because the site names in \fInewsfeeds\fR are unique (see below with \f(CW\*(C`news.uu.net\*(C'\fR and \f(CW\*(C`news.uu.net\-delayed\*(C'\fR). .IP \(bu 4 Possibly limit \fImax-connections\fR to \f(CW\*(C`1\*(C'\fR. .IP \(bu 4 Only keep in \fIinnfeed\-delayed.conf\fR the configuration of the peers which should receive a delayed feed. .IP \(bu 4 Add a new entry to \fInewsfeeds\fR in \fIpathetc\fR like: .Sp .Vb 4 \& innfeed\-delayed!\e \& :!*\e \& :Tc,Wnm*,S16384:/delayer \-\-delay 120 \-\- \e \& /innfeed \-c innfeed\-delayed.conf .Ve .Sp This will delay articles via that feed for 120 seconds. .IP \(bu 4 Use \f(CW\*(C`innfeed\-delayed!\*(C'\fR instead of \f(CW\*(C`innfeed!\*(C'\fR in the \fInewsfeeds\fR entries for peers which should receive a delayed feed. If you wish, you can also set up two entries for each peer, keeping a real-time feed through \f(CW\*(C`innfeed!\*(C'\fR for control articles and NoCeM messages, and delaying the feed of other articles through \f(CW\*(C`innfeed\-delayed!\*(C'\fR. .Sp .Vb 3 \& news.uu.net/uunet\e \& :!*,control,control.*,news.lists.filters\e \& :Tm:innfeed! \& \& news.uu.net\-delayed/uunet\e \& :*,!control,!control.*,@news.lists.filters\e \& :Tm:innfeed\-delayed! .Ve .Sp In that case, be sure to use the same \f(CW\*(C`news.uu.net\-delayed\*(C'\fR peer name in \&\fIinnfeed\-delayed.conf\fR. Note that you should only configure a delayed feed for a remote peer if its news administrator agrees with that (he may want a real-time feed, or already have locally implemented a delay on his incoming feeds). .IP \(bu 4 Reload the \fInewsfeeds\fR configuration file: .Sp .Vb 1 \& ctlinnd reload newsfeeds \*(Aqsetting delayed feeds\*(Aq .Ve .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-\-buffered\fR, \fB\-\-no\-buffered\fR" 4 .IX Item "--buffered, --no-buffered" By default, output is buffered. This increases the time until an article is actually sent if the number of articles is small. Disable buffering to have a more accurate delay, at a price of a (possibly neglectable) performance overhead. .IP "\fB\-\-delay\fR \fIseconds\fR" 4 .IX Item "--delay seconds" Delay articles by the given amount of seconds. Default is \f(CW\*(C`60\*(C'\fR. .IP "\fB\-\-store\fR \fIfilename\fR" 4 .IX Item "--store filename" By default, all buffered lines are written out if the input is closed, even if the configured delay has not been reached yet. .Sp When this flag is used, these lines will be written to the given file instead, to be used upon next startup. Using an absolute path name is recommended. .IP "\fB\-\-\fR \fIsome-other-program\fR [\fIargs\fR ...]" 4 .IX Item "-- some-other-program [args ...]" \&\fB\-\-\fR separates the options to \fBdelayer\fR from the program the output is written to: \fIsome-other-program\fR is the full path to the program, optionally followed with some \fIargs\fR parameters. .SH "LEGACY OPTIONS" .IX Header "LEGACY OPTIONS" This interface is considered legacy and will be removed some day. .IP \fIdelay\fR 4 .IX Item "delay" Delay articles by the given amount of seconds. .IP "\fIsome-other-program\fR [\fIargs\fR ...]" 4 .IX Item "some-other-program [args ...]" The full path to the program the output is written to, optionally followed with some \fIargs\fR parameters. .SH BUGS .IX Header "BUGS" If the standard input is closed (when for instance the feed is closed or restarted), all lines in the store are printed immediately, breaking the contract of delaying them, unless the \fB\-\-store\fR option is used. .PP If the number of articles in that feed is rather low (just a few articles per delay time or less), some effects of buffering will delay the transmission even further. See the \fB\-\-no\-buffering\fR option to alleviate this. .SH HISTORY .IX Header "HISTORY" Initial version written in July 1998 by Christian Mock . .PP Improved and documented by Christoph Biedl in January 2024. .SH "SEE ALSO" .IX Header "SEE ALSO" delay(1), innfeed.conf(5), newsfeeds(5).