.\" -*- 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 "SEND-UUCP 8" .TH SEND-UUCP 8 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 send\-uucp \- Send Usenet articles via UUCP .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBsend-uucp\fR [\fIsite\fR ...] .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBsend-uucp\fR program processes batch files written by innd(8) to send Usenet articles to UUCP sites. It reads a configuration file to control how it behaves with various sites. Normally, it is run periodically out of cron to put together batches and send them to remote UUCP sites. .PP It makes it possible to reduce bandwidth usage and to send news to remote UUCP sites which cannot receive a real-time feed (for instance if they are over dial-up connections). .SH OPTIONS .IX Header "OPTIONS" Any arguments provided to the program are interpreted as a list of sites specified in \fIsend\-uucp.cf\fR for which batches should be generated. If no arguments are supplied, then batches will be generated for all sites listed in that configuration file. .SH CONFIGURATION .IX Header "CONFIGURATION" The sites to which articles are to be sent must be configured in the configuration file \fIsend\-uucp.cf\fR in \fIpathetc\fR as set in \fIinn.conf\fR. Each site is specified with a line of the form: .PP .Vb 1 \& site[:host[:funnel]] [compressor [maxsize [batchtime]]] .Ve .IP \fIsite\fR 4 .IX Item "site" The news site name being configured. This must match a site name from newsfeeds(5). .IP \fIhost\fR 4 .IX Item "host" The UUCP host name to which batches should be sent for this site. If omitted, the news site name will be used as the UUCP host name. .IP \fIfunnel\fR 4 .IX Item "funnel" In the case of a site configured as a funnel, \fBsend-uucp\fR needs to flush the channel (or exploder) being used as the target of the funnel instead of flushing the site. This is the way to tell \fBsend-uucp\fR the name of the channel or exploder to flush for this site. If not specified, default to flushing the site. .IP \fIcompressor\fR 4 .IX Item "compressor" The compression method to use for batches. This should be one of \f(CW\*(C`bzip2\*(C'\fR, \&\f(CW\*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR or \f(CW\*(C`none\*(C'\fR. Arguments for the compression command may be specified by using \f(CW\*(C`_\*(C'\fR instead of spaces. For example, \f(CW\*(C`gzip_\-9\*(C'\fR. The default value is \f(CW\*(C`gzip\*(C'\fR. .IP \fImaxsize\fR 4 .IX Item "maxsize" The maximum size in bytes of a single batch \fIbefore\fR compression. The default value is \f(CW\*(C`500000\*(C'\fR bytes. .IP \fIbatchtime\fR 4 .IX Item "batchtime" A comma separated list of hours during which batches should be generated for a given site. When \fBsend-uucp\fR runs, a site will only be processed if the current hour matches one of the hours in \fIbatchtime\fR. The default is no limitation on when to generate batches. .PP Fields are separated by spaces and only the site name needs to be specified, with defaults being used for unspecified values. If the first character on a line is a hash sign (\f(CW\*(C`#\*(C'\fR) then the rest of the line is ignored. .SH EXAMPLE .IX Header "EXAMPLE" Here is an example for the \fIsend\-uucp.cf\fR configuration file: .PP .Vb 8 \& zoetermeer gzip 1048576 5,18,22 \& hoofddorp gzip 1048576 5,18,22 \& pa3ebv gzip 1048576 5,18,22 \& drinkel bzip2 1048576 5,6,18,20,22,0,2 \& manhole compress 1048576 5,18,22 \& owl compress 1048576 \& able \& pern::MYFUNNEL! .Ve .PP This defines eight UUCP sites. The first three and the last two use \f(CW\*(C`gzip\*(C'\fR compression, the fourth site (\f(CW\*(C`drinkel\*(C'\fR) uses \f(CW\*(C`bzip2\*(C'\fR and the remaining sites (\f(CW\*(C`manhole\*(C'\fR and \f(CW\*(C`owl\*(C'\fR) use \f(CW\*(C`compress\*(C'\fR. The first six use a batch size of 1\ MB, and the two last sites (\f(CW\*(C`able\*(C'\fR and \f(CW\*(C`pern\*(C'\fR) use the default of 500,000 bytes. The \f(CW\*(C`zoetermeer\*(C'\fR, \f(CW\*(C`hoofddorp\*(C'\fR, \f(CW\*(C`pa3ebv\*(C'\fR, and \&\f(CW\*(C`manhole\*(C'\fR sites will only have batches generated for them during the hours of 05:00, 18:00, and 22:00, and the \f(CW\*(C`drinkel\*(C'\fR site will only have batches generated during those hours and 06:00, 20:00, 00:00, and 02:00. There are no restrictions on when batches will be generated for \f(CW\*(C`owl\*(C'\fR, \f(CW\*(C`able\*(C'\fR and \&\f(CW\*(C`pern\*(C'\fR. .PP The \f(CW\*(C`pern\*(C'\fR site is configured as a funnel into \f(CW\*(C`MYFUNNEL!\*(C'\fR. \fBsend-uucp\fR will issue \f(CW\*(C`ctlinnd flush MYFUNNEL!\*(C'\fR instead of \f(CW\*(C`ctlinnd flush pern\*(C'\fR. .PP As for the \fInewsfeeds\fR file, the usual flags used for a UUCP feed are \&\f(CW\*(C`Tf,Wnb\*(C'\fR. Here is a typical entry for \f(CW\*(C`zoetermeer\*(C'\fR, where the batching is kept between 4\ KB and 1\ KB: .PP .Vb 3 \& zoetermeer\e \& :*,!junk,!control,!control.*/!foo\e \& :Tf,Wnb,B4096/1024: .Ve .SH "SETTING UP UUCP FEEDS" .IX Header "SETTING UP UUCP FEEDS" Here are the steps to follow to set up a UUCP feed over SSH between two news servers, using the UUCP implementation available in Debian as the \f(CW\*(C`uucp\*(C'\fR package. The mechanisms described below should be transposed if you use another UUCP implementation. (And if you do, please inform the INN maintainers about how to set up a feed with another UUCP implementation, so that it can be added to this documentation.) .IP 1. 4 First of all, make sure \fBrnews\fR is correctly installed setuid \f(CW\*(C`news\*(C'\fR, owned by group \f(CW\*(C`uucp\*(C'\fR, and mode \f(CW\*(C`4550\*(C'\fR. This will allow the UUCP subsystem to run \fBrnews\fR to process UUCP batches of news articles. The \f(CW\*(C`configure\*(C'\fR flag \fB\-\-enable\-uucp\-rnews\fR takes care of it when installing INN. Otherwise, you'll have to manually change the permissions on \fBrnews\fR. .IP 2. 4 Install the \f(CW\*(C`uucp\*(C'\fR package. It will notably provide uucico(8) and uux(1). .IP 3. 4 Configure in \fI/etc/uucp/Poll\fR the remote news servers to poll, and the hours during which they are to be polled. For instance, if you send to \f(CW\*(C`news.server.to.feed\*(C'\fR UUCP batches every 4 hours, you can use: .Sp .Vb 2 \& schedule news.server.to.feed 00 \& poll news.server.to.feed 00 04 08 12 16 20 .Ve .Sp If sending is hourly, just list all the hours. .IP 4. 4 Configure in \fI/etc/uucp/call\fR the credentials (usernames and passwords) to use when authenticating against remote news servers, one per line. For instance: .Sp .Vb 1 \& news.server.to.feed login password .Ve .IP 5. 4 Configure in \fI/etc/uucp/config\fR the UUCP name of the local news server. For instance: .Sp .Vb 1 \& nodename my.news.server .Ve .IP 6. 4 Check that \fI/etc/uucp/expire\fR fits your needs as for the number of days batches are retained as well as the configuration of daily reports. Default values are normally fine, though you may want to receive a daily report only if unusual things happen (and in that case, just set \&\f(CW\*(C`$important_only\*(C'\fR to \f(CW\*(C`1\*(C'\fR). .IP 7. 4 Configure in \fI/etc/uucp/passwd\fR the credentials (usernames and passwords separated by a tabulation) remote news servers use when authenticating against the local news server, one per line. For instance: .Sp .Vb 1 \& loginpassword .Ve .IP 8. 4 Configure in \fI/etc/uucp/sys\fR how remote news servers connect to the local news server. A typical entry to set an SSH connection is the following one where \fIpathbin\fR should be changed to the real path to \fBrnews\fR: .Sp .Vb 9 \& system news.server.to.feed \& call\-login * \& call\-password * \& commands /rnews \& time any \& chat "" \ed\ed\er\ec ogin: \ed\eL word: \eP \& chat\-timeout 120 \& protocol i \& port ssh.news.server.to.feed .Ve .IP 9. 4 Configure in \fI/etc/uucp/port\fR how to connect to remote news servers. A typical entry to set an SSH connection using a private key is: .Sp .Vb 5 \& port ssh.news.server.to.feed \& type pipe \& command /bin/ssh \-a \-x \-q \-i \-l uucp news.server.to.feed \& reliable true \& protocol etyig .Ve .Sp where \fIkey\fR is the path to the private key to use for the SSH connection, like for instance \fI/var/spool/uucp/.ssh/id_private_key\fR. .IP 10. 4 Make sure the administrators of remote news servers have added the public key related to \fIid_private_key\fR for connections to the \f(CW\*(C`uucp\*(C'\fR user of the remote news servers. .IP 11. 4 Supposing the home directory of the \f(CW\*(C`uucp\*(C'\fR user is \fI/var/spool/uucp\fR, you need to configure the SSH keys in the \fI.ssh\fR subdirectory. First, add the public keys of all remote news servers in \fIauthorized_keys\fR. A typical entry is the following one, which should be in 1 line (it is wrapped here for a proper display in man page): .Sp .Vb 3 \& no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding, \& command="/usr/sbin/uucico \-l",from="news.server.to.feed" \& ssh\-rsa xxxyyyzzz uucp@news.server.to.feed .Ve .Sp This ensures the SSH connection will not be used for another goal than exchanging UUCP batches. .IP 12. 4 Make sure \fIid_private_key\fR is correctly present, as set in \&\fI/etc/uucp/port\fR, and only readable by the \f(CW\*(C`uucp\*(C'\fR user. .IP 13. 4 Manually run as the \f(CW\*(C`uucp\*(C'\fR user the command set in \fI/etc/uucp/port\fR so as to create the \fIknown_hosts\fR file to make sure the SSH setting is fine. .Sp .Vb 1 \& /bin/ssh \-a \-x \-q \-i \-l uucp news.server.to.feed .Ve .IP 14. 4 Parameterize the feed to send to the remote servers. A typical entry in \&\fInewsfeeds\fR to generate batches in \fIpathoutgoing\fR is: .Sp .Vb 1 \& news.server.to.feed/pathname:*:Tf,Wnb,B4096/1024: .Ve .IP 15. 4 Set up the compression method, batch sizes and when to generate them in \fIsend\-uucp.cf\fR located in \fIpathetc\fR, as described earlier in this documentation. .Sp .Vb 1 \& news.server.to.feed bzip2 1048576 3,7,11,15,19,23 .Ve .IP 16. 4 Check that \fBsend-uucp\fR is started hourly in crontab by the \f(CW\*(C`news\*(C'\fR user. For instance in \fI/etc/cron.d/inn2\fR: .Sp .Vb 1 \& 52 * * * * news /send\-uucp .Ve .Sp It can be useful to set up a different launch time than your remote servers. For instance, if you generate batches every hour at minute 52, a remote peer may do the same at minute 22. This way, you may exchange articles more frequently, depending on when each other connects. .IP 17. 4 Check that UUCP programs are automatically started in crontab (usually, \&\fBuudemon.hr\fR is called hourly in \fI/etc/cron.d/uucp\fR to poll remote news servers, and \fBuudemon.day\fR daily in \fI/etc/cron.daily/uucp\fR). .Sp Like for \fBsend-uucp\fR, adjust the launch time to maximize the number and the freshness of batches to exchanges. .IP 18. 4 Check the logs in \fI/var/log/uucp\fR to ensure everything works fine, both polling and sending. .Sp You will see that \fBsend-uucp\fR prepares \fBrnews\fR batches named like \&\fID.0I8Y\fR, that are queued by \fBuux\fR. When \fBuucico\fR is afterwards started from cron to transfer these batches, \fBuucico\fR takes available batches from the remote sites at the same time. These received batches are then processed by \fBuuxqt\fR which calls \fBrnews\fR to inject them. .Sp That's all! .SH FILES .IX Header "FILES" .IP \fIpathbin\fR/send\-uucp 4 .IX Item "pathbin/send-uucp" The Perl script itself used to create news batches from the outgoing files. .IP \fIpathetc\fR/send\-uucp.cf 4 .IX Item "pathetc/send-uucp.cf" The configuration file which specifies a list of sites to be processed. .IP \fIpathlog\fR/send\-uucp.log 4 .IX Item "pathlog/send-uucp.log" The log file used if the syslog facility is not available. .SH HISTORY .IX Header "HISTORY" This program was originally written by Edvard Tuinder and then maintained and extended by Miquel van Smoorenburg . Marco d'Itri cleaned up the code for inclusion in INN. This manual page was written by Mark Brown . .SH "SEE ALSO" .IX Header "SEE ALSO" innd(8), newsfeeds(5), uucp(8).