NEWSX(8)

๐Ÿ“ฆ
version 1.6 ยท 2 versions
, in fedora 43

๐Ÿฆ‹ NAME

okay so bestie, meet newsx โ€” she's the news server exchange; post and fetch news articles girlie ๐Ÿ’…. She lives in the System Manager's Manual, section 8 (that's the (8) at the end, iykyk โ€” she's a big-deal admin tool, not a lil userland script โœจ).


๐ŸŒธ SYNOPSIS

newsx [ options ] [ spoolname [ [ hostname ] port ] ]

๐Ÿ’– DESCRIPTION

So newsx is a client that connects to an NNTP server, and it's doing two things at once like a true multitasker ๐Ÿ‘‘: it posts outgoing articles that were batched up by the news system, and it also fetches new incoming articles from that same newsserver. Both. At once. She contains multitudes ๐Ÿฆ‹.

It provides the NNTP capabilities required for serving a small local news spool โ€” y'know, the kind of setup you find on installations where your only NNTP access is through limited ISP accounts ๐Ÿซถ. But she's also suitable for exchanging news with supplemental news sources for full scale news servers. Versatile queen, no cap โœจ.


โš™๏ธ OPERATION

The program would normally be run by user news. That's her natural habitat ๐Ÿ’….

When started, newsx will go through the spoolname outgoing spool queue and attempt to post all the articles in there to the NNTP server hostname. Everything. Every last one. She's thorough like that ๐Ÿ”ฅ.

If a username and password for use with the simple authorization protocol have been supplied, they will be sent to the server first. If the -r option is specified, a MODE READER command will be sent.

When the outgoing transfer is finished, articles will be removed from the outgoing spool queue if:

  • successful transfer has been acknowledged by the NNTP host โœ…
  • the article was specified by the host as a duplicate (already posted) โœ…
  • a spooled article can no longer be found โœ…

The fetch phase is then initiated. Articles available from the newsserver will be fetched and placed in the incoming spool, ready to be injected into the news system by newsrun (C News) or rnews -U (INN). She's just handing them off, doing her part ๐ŸŽ€.

The groups are visited in the sequence that they appear in the host incoming state file โ€” see in.hosts(5). This may be used actively to prioritize between newsgroups. A tag mechanism controlled by the -e option is available to limit the number of groups that will be fetched.

Group names not present in the active file will not be fetched. Every group name is checked against the spoolname entries in the sys (C News) or newsfeeds (INN) file, as well as any --groups option, and only groups allowed there will actually be fetched. For C News, the group name is also checked against the ME entry, whereas in INN the ME entry is just prepended to the spoolname entry.

In this way, the sys/newsfeed file is used to control which newsgroups are actually received from the remote site, in the same manner that the local server determines which outgoing article will go where. Same energy, different direction โœจ.

If an -e option hasn't been specified, the local active file is then traversed to see if there are groups not mentioned in the current host newsrc file. Again, only groups allowed by sys or newsfeeds is actually fetched. Since these groups don't have a starting point specified, all available articles will be fetched. Go big or go home ๐Ÿ’….

To avoid transferring cross-posted articles more than once, articles with message IDs already fetched in the same session will not be fetched again. No double-dipping, we don't do that ๐Ÿ™ˆ.

To make multiple news sources to be used in an efficient manner, articles present in the history database will be skipped. Already seen it, moving on ๐Ÿ’….

The pull phase can be omitted entirely by using the -g option.

Statistics on the connection will be logged to syslog (or stderr with -d). Let's break down the receipts ๐Ÿงพ:

  • The posted article count is the total number of articles actually posted.
  • The duplicate count is how many message IDs from posted messages that were found to already exist on the remote system.
  • The missing count is those posted articles that could no longer be found locally โ€” usually because they were canceled locally, or perhaps since they were expired already.

The connection time and the total number of characters transferred via the NNTP layer is logged, in addition to the average speed of article transfer. The speed given is the net rate, the calculation being based on the actual number of characters belonging to news article head and body parts. Math girlie is mathing ๐Ÿ”ฅ.

A log file may be specified with the -l option, and a folder of posted messages maintained with the -f option.


๐ŸŽ€ ARGUMENTS

  • options โ€” As detailed below. ๐Ÿ‘‡
  • spoolname โ€” The name of the outgoing spool queue. If not specified, the value of the NNTPSERVER environment variable will be used.
  • hostname โ€” The hostname of the remote NNTP server to connect to. If not specified, the name of the spool will be used.
  • port โ€” The port used for connecting to hostname. Will usually not need to be specified, and port "nntp" will be assumed. The port name "telnet" will receive special treatment ๐Ÿ‘€.

๐Ÿ“ OPTIONS FOR LOGGING

  • -f folder, --posted folder โ€” Posted articles will be appended to the standard mail folder indicated. Note that the article will be added to the folder the first time posting of an article is attempted. The actual status of the posting will appear in the log file. So like, it goes in the folder before we even know if it worked โ€” the log is where the truth lives ๐Ÿ’….
  • -l logfile, --log logfile โ€” Log information about successfully posted articles to the file indicated.
  • --stat statfile โ€” A summary of article exchange statistics will be logged to the file indicated.
  • --scanlogs โ€” Obey locks set by the INN scanlogs utility. This is currently only meaningful for use with a modified scanlogs that understands newsx logs.

๐Ÿ” OPTIONS FOR NEWS ACCESS

  • -a authfile, --auth authfile โ€” If specified, the username and password combination found in authfile will be sent to the server as part of the simple authorization protocol when the connection is first made. The file should consist of a line with two blank-separated words, the first being the username, the second the password. Do ensure that this file only has read access only for those users that need to know. ๐Ÿ”’> seriously bestie, lock that file down โ€” it's literally a password sitting in a text file.
  • --authgeneric โ€” Authentication with the server is performed using AUTHINFO GENERIC. This works by spawning a child process via /bin/sh string, where string is set in the environment variable NNTPAUTH. This process is expected to handle the authentication portion of the connection.
  • -r, --reader โ€” A MODE READER command is sent to the remote server. This is used when connecting to remote INN hosts that needs it, and is the default state when using --ihave. With ihave, the command is issued between the ihave and fetch phase, otherwise the command is issued initially.
  • --no-reader โ€” No MODE READER command is sent to the remote server. This is the default state when not using --ihave.
  • --readbeforeauth โ€” Send the MODE READER command before attempting to authenticate via an AUTHINFO command. Otherwise, it is sent after the authentication. This option will obviously have no effect unless you also specify both --reader and one of --authgeneric or --auth authfile. ๐Ÿ™ˆ like, it does nothing on its own, it needs friends.
  • -w chatfile, --chat chatfile โ€” Use chatfile to control any special connect sequence that may be required before the NNTP protocol is connected. Only implemented for the "telnet" protocol.
  • -x command, --exec command โ€” If specified, the command will be executed after the host port has been opened. This option is used in rare cases when special tricks has to be employed to get an NNTP connection activated.
  • -y program, --connect program โ€” If specified, connect via a bidirectional pipe to program instead of to a socket. The hostname and port arguments will be ignored.

๐Ÿ“ฎ OPTIONS FOR POSTING

  • -p, --no-post โ€” Do not attempt to do any posting. She's just here to fetch today ๐Ÿ’….
  • --ihave โ€” Use NNTP IHAVE mechanism for submitting news messages, instead of the default POST. If this is for forwarding news in general, and not necessarily news generated locally, the setting of the --fail and --bounce option should be carefully reviewed. ๐Ÿ‘€ review those, fr fr.
  • -m, --no-msgid โ€” Remove any message-ID header field from the posted message. This should cause the receiving end to generate a fresh message-ID. It should never been used together with --ihave. > bestie do NOT combine this with --ihave, that's chaos ๐Ÿ’€.
  • -k, ----keep-path โ€” Keep the Path when posting. In posting mode, the Path is by default stripped together with the NNTP-Posting-Host and Xref header items, so that the path of the news article as posted will appear to start at the actual posting host. With --ihave, the path is always included.
  • --continue โ€” Ignore (but report) errors about non-existing outgoing spools, and continue with news fetching instead. She's not gonna let a missing spool ruin her whole day โœจ.
  • --max-path len โ€” All outgoing articles are checked to see if the length of their paths are not too long. This is an extra precaution against inadvertently submitting foreign articles for posting. This option sets the maximum path length allowed. The default value is 1, consistent with a simple, local, newsspool. To disable this feature, set it to an impossibly large value, like 999.

and bestie, that's only the beginning โ€” there's more of this page coming ๐Ÿ’–

๐ŸŽ€ OPTIONS FOR FETCHING ๐ŸŽ€

okay bestie, this is the section where you tell newsx what to actually grab. buckle up ๐Ÿ’–

  • -g, --no-fetch โ€” literally just... don't fetch any news articles. that's it. that's the whole vibe. ๐Ÿšซ
  • -e end_tag, --end end_tag โ€” set a tag in the incoming host state file (peep in.hosts(5) for the deets). news fetching stops when it hits the matching tag line. the tag line is a colon followed by the tag itself. this is so useful for splitting your newsgroups into categories โ€” like, maybe you only fetch a few groups during prime time, but the full list once every night. main character scheduling energy โœจ
  • -W winsize, --window winsize โ€” sets the window size, aka how many outstanding NNTP requests are allowed at any one time. default is 10. a value of 0 disables windowing (aka streaming) completely, which makes debugging way easier. bumping the window up can significantly improve article transfer speed ๐Ÿ”ฅ โ€” the effect is particularly pronounced over slow links and when lots of the articles are already chilling in the local spool, where folks have seen an improvement of over 10 times compared to running with windowing disabled. all of this at the penalty of an increased host newsserver load, obviously. tradeoffs, bestie ๐Ÿ’…
  • -b minspool, --size minspool โ€” sets the minimum incoming spool size. after every new group, if the spool file has hit the byte size you specified, a new spool batch gets made. setting this value to 1 will cause every single newsgroup to land in its own separate spool. ๐Ÿ—‚๏ธ
  • --rnews โ€” pipe incoming messages straight to rnews instead of dropping them into the in-coming spool. ๐Ÿšฐ
  • --pipe-to program โ€” pipe incoming messages to program instead of the in-coming spool. heads up: a separate program and pipe gets initiated for each incoming message. ๐Ÿ™ˆ
  • --rnews-to program โ€” like --pipe-to, except the pipe is continuous for each session, with article seperation in rnews style. ๐Ÿฆ‹
  • -z, --sync โ€” skip the actual pulling of news articles entirely. instead, just update the host incoming state file to synchronize with the currently highest available article numbers from the server in question. this is handy when you're initiating a fresh local spool. no article posting will be attempted. see also in.hosts(5). โœจ
  • -Z, --syncnew โ€” same energy as above but for previously unseen groups only. the net effect: newly added groups start fetching from now on, instead of from the first article available at the host server. ๐ŸŒฑ
  • --reset โ€” ignore the latest article information in the host incoming state file and try to fetch all articles available from the server, subject to the normal history lookup constraints. useful if the remote spool has been reconfigured. see also in.hosts(5). ๐Ÿ”„
  • --filter filterprog โ€” turn on message filtering via the program filterprog. uses the highwind interface model, where each article is given to the filter in NNTP-fashion, and the filter responds with a 335 to accept, and a 435 to reject a message. ๐Ÿงš
  • --mfilter filterprog โ€” filtering by message ID. filterprog gets invoked once for each unseen message, with the message ID as a command line argument. a non-zero return status will prevent the message from being transferred.
โš ๏ธ heads up bestie: this function is obsolete, and will probably be removed in later versions. don't get too attached ๐Ÿ’€
  • -X num, --maxnew num โ€” fetch at most num articles from each new and previously unseen newsgroup. ๐Ÿ”ข
  • --maxart num โ€” fetch at most num articles from each newsgroup.
โš ๏ธ note that this might cause articles to be silently lost. no cap, be careful ๐Ÿ˜ญ
  • --no-path โ€” unless the exclusion pattern is set to newsx, all incoming articles get checked to see if their path is consistent with the exclusions given in /usr/lib/news/newsfeeds. this option omits that check. ๐Ÿ›ฃ๏ธ
  • --forget-inactive โ€” remove information in the incoming hosts state file about newsgroups that have been removed from the /usr/lib/news/active file. see also in.hosts(5). ๐Ÿงน
  • --minfree N โ€” don't fetch news if there are less than N kbytes of free space in the news spool. ๐Ÿ’พ
  • --group list โ€” specify a pattern for groups to be fetched that applies in addition to the ones in /usr/lib/news/newsfeeds. the syntax is basically the same as for INN newsfeeds(5). it's recommended to put list in single quotes, since shells may otherwise treat the ! character in strange ways. for a list that specifies only negations, an initial '*' clause will be assumed. ๐ŸŒˆ

This options is particularily useful to specify unsymmetric behaviour, i.e. groups where there will be outgoing traffic, but no incoming articles. For instance, to explicitly avoid fetching of control groups, use:

--groups '!control.*'

It can also be useful to specify that only a subset of groups should be fetched for the occasion, e.g:

--groups 'comp.*,!*.advocacy'

It is recommended to put the argument for --groups in single quotes. ๐Ÿ’…


๐Ÿ’œ GENERAL OPTIONS ๐Ÿ’œ

  • -c, --cnews โ€” set to C News mode as opposed to INN. controls details regarding handling of spool and lock files. ๐Ÿ—ƒ๏ธ
  • -i, --inn โ€” set to INN mode as opposed to C News. controls details regarding handling of spool and lock files. ๐Ÿ—ƒ๏ธ
  • --newline โ€” uses a single newline character as line terminator instead of the carriage return, line feed sequence. ๐Ÿ“
  • -v, --version โ€” display program version. include this when reporting bugs to http://www.kvaleberg.com/bug/ ๐Ÿ›
  • --help โ€” give a very brief usage summary. ๐Ÿซถ
  • --no-ps โ€” do not update the process status display. ๐Ÿ™ˆ

๐ŸŒธ OPTIONS FOR NEWSGROUPS ๐ŸŒธ

๐Ÿ“Œ Note: unless otherwise specified, these options are in addition to the usual actions and do not imply --no-post or --no-fetch. specify those switches if desired.
  • --list listname โ€” obtain a list of newsgroups from the newsserver to listname. the list is one line per newsgroup, containing the newsgroup name, a blank, and a letter showing the group status (usually 'y' for an active group, 'm' for a moderated group). ๐Ÿ“‹

If the first character is a '|', listname is assumed to be a program path which will receive the list as standard input (you will need to put the entire argument in quotes to escape the usual shell interpretation of '|'). If it is a single '-', the list will appear on the standard output. Otherwise it will be assumed to be a filename.

  • --newlist listname โ€” obtain a list of newsgroups not currently present on the local server, from the newsserver to listname. the list is also subject to the limitations of the sys or newsfeeds file. the operation is otherwise as for the --list option. ๐Ÿ†•
  • --desc descname โ€” obtain a list of newsgroups descriptions from the newsserver to descname. only descriptions for locally active newsgroups relevant to the newsfeed in question will be fetched. ๐Ÿ“–

The list consists of one line per newsgroup, containing the newsgroup name, a tab, and a short textual description. A pipe may be specified in descname kist as for the --list option.

  • --alldesc descname โ€” obtain a list of all newsgroups descriptions available from the newsserver to descname. the operation is otherwise as for the --desc option. ๐ŸŒ

๐Ÿ˜ญ OPTIONS FOR ERROR HANDLING ๐Ÿ˜ญ

  • -t timeout, --timeout timeout โ€” specify timeout for TCP/IP and lockfile operations, in seconds. the default value is 600. โฑ๏ธ
  • --fail time โ€” specify the maximum age of an article. whenever an attempt of posting an article fails, and the specified time limit is exceeded, the article will be declared as failed, and a bounce message will be generated. the default unit is hours; the suffixes s for seconds, m for minutes, h for hours, d for days and w for weeks would change this. they can also be combined, e.g. "4h30m". in absence of this option, no fail by age will be performed. setting the time to zero will bounce messages after the first failed attempt. ๐Ÿ’ฅ
  • --bounce addr โ€” specify the destination address for messages bounced due to the fail time being exceeded. if addr is specified as none, no bounce will be generated. the default value, poster, causes messages to be returned to the sender.
โš ๏ธ this setting should definitely only be used in situations where newsx is utilized for posting locally generated news. seriously bestie, don't just leave this lying around ๐Ÿ’€
  • --attach how โ€” specifies the way the original message is handled for bounced messages:
    • mime โ€” send the original as a Mime attachement. this is the default behaviour. ๐Ÿ“Ž
    • yes โ€” append the original to the mail message itself. ๐Ÿ“ฉ
    • no โ€” do not attach the original message. ๐Ÿšซ

๐Ÿ‘‘ OPTIONS MOSTLY FOR NEWS GATEWAYS ๐Ÿ‘‘

the following options are not for ordinary use: they would only be used for special configurations where newsx is used as a sort of gateway to inject news messages from other sources. iykyk ๐ŸŒ‰

  • --inews โ€” pipe incoming messages directly to inews, inject them into the local spool via the same interface as is used for local new messages. ๐Ÿš€
  • --inews-options options โ€” specify command line options for --inews. the leading '-' must be included. the default inews options are "-hOS". โš™๏ธ
  • --add-header header โ€” add a specific header to incoming messages. the header will be added exactly as specified, adding a trailing newline. โž•

The exception is for the special 4 letter string "Path". This will be replaced by a header line that says "Path: HOSTNAME!not-for-mail" if the incoming message contains no Path:. This can be quite essential for news gateways to prevent injected messages to be retured back to the source. ๐Ÿ”


๐Ÿฆ‹ OPTIONS FOR PROFILE FILES ๐Ÿฆ‹

  • --profile file โ€” read a newsx profile from file. this file can contain command line options to specify default newsx behaviour. see newsx.conf(5) for an overview of the format. ๐Ÿ“„

Any option may be used in profile files. Some options are really only meaningfull in profile files:

  • --spoolname spoolname โ€” specify a default spoolname. ๐Ÿ—‚๏ธ
  • --hostname hostname โ€” specify a default hostname. ๐Ÿ 
  • --port port โ€” specify a default port for connecting to hostname. ๐Ÿ”Œ

๐Ÿ’– OPTIONS FOR CONFIGURATION ๐Ÿ’–

So like, back in the day, tweaking things to match your local news setup was a build-time thing โ€” you compiled it in and that was that. But nah, bestie, you can also do it at runtime, several different ways. Let's get into it โœจ

  • --config โ€” Reads the standard news config file at /usr/lib/news/lib/innshellvars and obeys it. The whole point is that newsx can roll with the punches when your local newsserver config changes โ€” dynamic queen behavior ๐Ÿ’…
  • --config-is configfile โ€” Same energy as --config, except you name the config file. You can even hand it a whole list of files, separated by colons, and it'll use the first one on that list that actually exists. First come, first served, no cap ๐ŸŽ€
  • --home newshome โ€” Use newshome as the news home directory instead of the default /usr/lib/news. Heads up: you gotta give a full path. No shortcuts here ๐Ÿฆ‹
  • -s spooldir, --spool spooldir โ€” Use spooldir as the news article spool directory instead of the default /var/spool/news. Again โ€” full path required, don't play games ๐ŸŒธ
  • --togo togofile โ€” Names the C News togo file for outgoing news. Does nothing in INN mode. You only need it if it's different from the default /var/spool/news/outgoing/spoolname/togo. Path rules, listen up: a leading / means a full path, a leading . means relative from the current directory, and anything else is relative to /var/spool/news/outgoing/spoolname ๐Ÿ‘‘
  • --batch batchdir โ€” Use batchdir as the outgoing news article spool directory instead of the default /usr/lib/newsbin. Same path logic: leading / = full path, leading . = relative from the current directory, otherwise it's relative to /var/spool/news โœจ
  • -h historydb, --history historydb โ€” Names the history database file, which is the thing that checks whether news articles are already sitting in the spool. You only need this if your name differs from the default /usr/lib/news/history. Oh and โ€” pass an empty argument "" and it will prevent any reference to the news history database. Gone. Poof ๐Ÿ’€
  • --active activefile โ€” Names the active newsgroup file for incoming news. Only needed if it's not the default /usr/lib/news/active. Path conventions: leading / = full path, leading . = relative to the current directory, otherwise relative to /usr/lib/news ๐ŸŒˆ
  • --newsfeeds newsfeedsfile โ€” Names the newsfeed specification file. This overrides the default in both C News (sys) and INN (newsfeeds) modes. Same filename conventions as --active ๐Ÿซถ
  • --incoming incomingdir โ€” Use incomingdir as the incoming news article spool directory instead of the default /var/spool/news/incoming. Filename conventions same as --active, except the default directory here is /var/spool/news ๐Ÿ’œ
  • --inhosts inhostsdir โ€” Use inhostsdir as the news host active file directory instead of the default /var/spool/news/inhosts. Name conventions same as --incoming. Also go peek at in.hosts(5) โญ
  • --hostconfig hostconfigdir โ€” Use hostconfigdir as the directory for the host specific profile instead of the default /var/spool/news/in.hosts. Name conventions same as --incoming. See also newin.hosts(5) and newsx.conf(5) ๐ŸŒธ

๐Ÿ”ฅ OPTIONS FOR TESTING AND DEBUGGING ๐Ÿ”ฅ

This is where the main character energy gets loud. ๐Ÿ‘‘

  • --debug level โ€” Sets the debug level. Any level that isn't zero sends reporting to stderr instead of syslog, and turns on extra debugging output. Level by level, bestie:
    • Level 2 prints a . for every new article.
    • Level 3 logs all NNTP commands.
    • Level 4 produces the same state info you'd get from the process status display.
    • Level 5 produces additional debug information.
    • Level 6 includes history database debug.
    • Level 7 shows all communications over the NNTP socket, article content included. Like, everything. Full tea โ˜•
  • -d, --verbose โ€” Enables debugging, and the debug level goes up according to how many times you specify it. Stack 'em ๐Ÿ’…
  • -n, --dry-run โ€” The no-action flag. It'll "fake" an NNTP connection and leave the outgoing batch untouched. Probably only useful alongside --debug for debugging and dry-testing โ€” a lil rehearsal, no real consequences ๐ŸŽ€
  • --verify โ€” Used together with --configor --config-is, it causes the configuration to be verified, but not adapted to. You're just checking, not committing ๐Ÿฆ‹
  • -o, --keepold โ€” Keeps the previous outgoing spool in an .old file. Sounds super useful for everyday use, right? Plot twist: a non-empty file might make a news watch program believe there's a stale outgoing spool. So likeโ€ฆ careful ๐Ÿ˜ญ
  • -u, --no-force โ€” After lockfile operations time out, it just gives up โ€” it won't try to unlock the lockfiles and remove the stale process. It's the "not my problem" flag ๐Ÿ’€
  • --no-queue โ€” Don't queue up for access to a news host. If a lock already exists for the specified host, it just gives up and doesn't queue up for it. No waiting in line, periodt ๐Ÿ™ˆ
  • --locks locksdir โ€” Use locksdir as the lock file directory instead of the default /usr/lib/news. Filename conventions same as --active, except the default directory is /usr/lib/news. And if you supply the string none, no locking will occur at all.
Okay so all of this should obviously only be used if you really, really know what you're doing. Like genuinely. Fr fr. ๐Ÿšจ
  • -q "msgid", --enquire "msgid" โ€” Asks whether the msgid is present in the local history database. The msgid should include the angle brackets. This implies --no-post and --no-fetch ๐Ÿ“
  • --no-hostlock โ€” Don't implement the newsx host access lock. Should only be used if you really know what you're doing. (Same warning energy as above, bestie, don't be reckless ๐Ÿ’œ)
  • --no-next โ€” Don't use the NNTP NEXT command. This stops newsx from attempting to use NEXT to fill in gaps in the article sequence ๐ŸŒธ
  • --missing "num" โ€” Tunes how many missing articles in a row you tolerate before a NEXT command gets issued instead of a sequential STAT. A value of zero causes NEXT to be used extensively. Default value is 0 if no window, 2 if a window is specified ๐Ÿ‘‘
  • --keep-fake โ€” Some remote news servers generate faked news articles. Normally you'd want newsx to skip them, but with this option you can actually fetch them. Collect the fakes, I guess โœจ

๐ŸŒˆ SPECIAL CONNECT SEQUENCE ๐ŸŒˆ

The -w option says: a special connect sequence is required, and the script for that sequence lives in the chatfile. That file is made of lines containing pattern / receive / send pairs, separated by blanks. The patterns may be enclosed in quotes. Currently this script is only available for the "telnet" protocol. Just telnet. That's the vibe ๐Ÿซถ

A typical invocation line looks like:

newsx -w chat.acme acme login.acme.net telnet

And the file chat.acme could look like this:

# login for acme.net NNTP
login: myusername
Password: mypassword
$ "exec telnet news.acme.net nntp"
ECHO

Obviously the script has to be adapted for local conditions โ€” your setup, your rules ๐Ÿ’…

The special tag ECHO says that line echo should be suppressed. This is required because the host telnet operates in line mode. No echo, no chaos โœจ

Since this file usually contains passwords and other sensitive information, make sure read access to it is limited. Lock it down, bestie. Do not leave this lying around ๐Ÿ”’๐Ÿ˜ญ

๐Ÿ‘‘ PROCESS STATUS ๐Ÿ‘‘

The ps process status will also show the current newsx status. During the actual news transfer phase, it shows which group and article number is being fetched. You can get a continuous status with:

newsq -c

This feature can be turned off via the --no-ps option ๐ŸŽ€


๐ŸŒธ CONFIGURATION FORMAT ๐ŸŒธ

For INN, the following configuration items get used:

  • $INND โ€” Signals an INN configuration.
  • $NEWSBIN โ€” Directory for INN binaries.
  • $NEWSHOME โ€” News home directory.
  • $PATHETC โ€” Directory for news configuration files. Defaults to $NEWSHOME if not available.
  • $SPOOL โ€” If $SPOOL contains the string "/articles", the incoming host directory $INHOSTS is formed by replacing it with "/inhosts". Otherwise, "$SPOOL/in.hosts" is used.
  • $BATCH โ€” Outgoing spool.
  • $INCOMING โ€” Incoming spool.
  • $ACTIVE โ€” Active file.
  • $HISTORY โ€” History database.
  • $LOCKS โ€” DIrectory for lockfiles.
  • $NEWSFEEDS โ€” Newsfeeds file.
  • $EXTENDEDDBZ โ€” True if the history database is in extended format. Only relevant for early INN 2.x where there is no libinn; otherwise ignored.

For C News:

  • $NEWSBIN
  • $NEWSCTL โ€” Equivalent to INN's $NEWSHOME. $ACTIVE will be "$NEWSCTL/active". $HISTORY will be "$NEWSCTL/history". $NEWSFEEDS will be "$NEWSCTL/sys". $LOCKS and $PATHETC will be "$NEWSCTL".
  • $NEWSARTS โ€” Equivalent to INN's $SPOOL. $BATCH will be "$NEWSARTS/out.going". $INCOMING will be "$NEWSARTS/in.coming". $INHOSTS will be "$NEWSARTS/in.hosts".

๐Ÿฆ‹ LOG FILE FORMAT ๐Ÿฆ‹

The -l log file of posted articles contains one line for each article. And to stay compatible with the INN format, every field is separated by a tabstop. Very particular, very iconic ๐Ÿ’…

  • Month โ€” Standard 3 letter abbreviation.
  • Date โ€” 2 digits.
  • HH:MM:SS โ€” Local time.
  • Year โ€” 4 digits.
  • Spool โ€” Name of outgoing spool.
  • <Msgid> โ€” Within angle brackets.
  • Filename โ€” As it appears in the spool file.
  • Sender โ€” The value of the Sender-field, or From-field if no Sender is available.
  • Status โ€” "OK" for successfully posted items, "Duplicate" for items already posted.
  • Lines โ€” Number of lines in the posting.
  • Status โ€” Message status. "OK" if everything went well, otherwise an error message appears.

๐Ÿ’œ INCOMING SPOOL FORMAT ๐Ÿ’œ

The incoming spool is made of files whose file name ends with ".t". Each file can contain many articles. Every article is prefixed by this header:

#! rnews N

The number N is the number of bytes of the article proper โ€” not counting the header line. The article follows right after the header line. It appears exactly as received from the news server, except that CR/LF sequences are replaced by proper newlines, and the terminating full stop is not included. Cleaned up and ready to go, no crumbs left behind โœจ

๐Ÿ’Œ MESSAGE HEADER HANDLING ๐Ÿ’Œ

Okay so bestie, let's talk headers, because this is where the โœจmagicโœจ happens (or doesn't) ๐ŸŽ€

Incoming message headers? They just vibe straight through, no modification, no touchy. Except one lil' thing: the text newsx gets added if it isn't already there, and that happens when the exclusion pattern for the newshost is set to newsx. That's it, that's the whole exception ๐Ÿ’…

Outgoing header items mostly cruise on through too, but a few of them get special treatment:

  • From: โ€” gets used to identify the sender if literally everything else fails. backup plan energy ๐Ÿซถ
  • Message-ID: โ€” gets used for logging purposes. And heads up: the --no-msgid will remove this item for messages being posted.
  • NNTP-Posting-Date:
  • NNTP-Posting-Host: โ€” will always be removed for messages being posted. bye bestie ๐Ÿ‘‹
  • Path: โ€” will be removed for messages being posted, unless the ----keep-path option is given.
  • Reply-to: โ€” will be used for indentifying the sender.
  • Sender: โ€” will be used for indentifying the sender.
  • Xref: โ€” will always be removed from outgoing messages. gone. not invited. ๐Ÿ’€
  • X-Server-Date:
  • X-Trace:
  • X-Complaints-To: โ€” will always be removed for messages being posted.

๐Ÿฉบ DIAGNOSTICS ๐Ÿฉบ

When newsx clocks out, it tells you how it went with one of these lil' exit codes. Numbers never lie, fr fr ๐Ÿ”ข

  • 0 โ€” Successful completion ๐ŸŒŸ
  • 1 โ€” General system error
  • 2 โ€” Incorrect arguments supplied.
  • 3 โ€” Error connecting to remote host
  • 4 โ€” NNTP Protocol error
  • 5 โ€” Errors accessing outgoing spool file.
  • 6 โ€” Errors accessing host newsrc file.
  • 7 โ€” Errors accessing incoming spool file.
  • 8 โ€” Errors accessing local active and sys files.
  • 9 โ€” Socket access error (e.g. connection timeout)
  • 10 โ€” Errors accessing authinfo file.
  • 11 โ€” Connect script failure.
  • 12 โ€” Option -q did not find the message ID.
  • 13 โ€” Wait for lock timed out.

๐Ÿ“ NOTES ๐Ÿ“

Distribution fields? newsx does not care. It ignores them completely and leaves the whole handling situation to the news server. Not my job, not my problem ๐Ÿ’โ€โ™€๏ธ


๐Ÿ› BUGS ๐Ÿ›

Found a bug? Spill it here: http://www.kvaleberg.com/bug/ ๐Ÿซถ


๐Ÿ“‚ FILES ๐Ÿ“‚

Also peep in.hosts(5) while you're at it ๐Ÿ‘€

  • /usr/lib/news/newsx.conf โ€” Newsx standard profile. If it exists, this profile file will be read before the command line arguments are parsed. See newsx.conf(5).
  • /usr/lib/news/lib/innshellvars โ€” The standard news configuration file.

๐ŸŒธ For C News ๐ŸŒธ

  • /var/spool/news/outgoing/spoolname/togo โ€” Spool file
  • /var/spool/news/outgoing/spoolname/togo.old โ€” Previous spool file
  • /var/spool/news/outgoing/spoolname/LOCKb โ€” Lock file
  • /var/spool/news/incoming/.tmp.$$ โ€” Incoming spool, temporary file. $$ is the process ID.
  • /var/spool/news/incoming/T.$$.S.t โ€” Incoming spool, when finished and ready for newsrun. T is the current Unix time, $$ is the process ID, and, S is a sequence number.
  • /usr/lib/news/active โ€” Local active file, contains a list over all currently active newsgroups in the local spool. This is used as a basis for constructing a list over which newsgroups will actually be requested.
  • /usr/lib/news/sys โ€” Newsserver configuration file. This is used as a filter against the local active list, deciding which newsgroups which will actually be pulled. The basic format of each specification is:
site/exclusions:grouplist/distlist:flags:cmd

If the exclusions field is set to newsx, newsx will modify the path of incoming news to include the "newsx" pattern.

The site field identifies the remote news source.

The grouplist is a comma separated list of group pattern names. A !-prefix signifies exclusions, and the name all matches anything.

  • /usr/lib/news/history
  • /usr/lib/news/history.pag
  • /usr/lib/news/history.dir โ€” Local news spool database.

๐Ÿฆ‹ For INN ๐Ÿฆ‹

  • /var/spool/news/outgoing/spoolname โ€” Spool file
  • /var/spool/news/outgoing/spoolname.old โ€” Previous spool file
  • /usr/lib/news/LOCK.spoolname โ€” Lock file
  • /usr/lib/news/active โ€” Local active file, contains a list over all currently active newsgroups in the local spool. This is used as a basis for constructing a list over which newsgroups will actually be requested.
  • /usr/lib/news/newsfeeds โ€” Newsserver configuration file. This is used as a filter against the local active list, deciding which newsgroups which will actually be pulled. The basic format of each specification is:
site/exclusions:grouplist/distlist:flags:param

If the exclusions field is set to newsx, newsx will modify the path of incoming news to include the "newsx" pattern.

The site field identifies the remote news source.

The grouplist is a comma separated list of group pattern names. A !-prefix signifies groups not exchanged, and the name * matches anything.

  • /usr/lib/news/history
  • /usr/lib/news/history.pag
  • /usr/lib/news/history.dir โ€” Local news spool article database.

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Egil Kvaleberg <egil@kvaleberg.no> โ€” the icon, the legend, the whole entire moment ๐ŸŒŸ


๐Ÿ”— SEE ALSO ๐Ÿ”—


and that's a wrap on the whole page, bestie!! ๐ŸŽ€โœจ this was NEWSX(8) โ€” yeah, the whole thing, section 8 of the manual, no cap ๐Ÿ’… go forth and sync your news like the main character you are ๐Ÿฆ‹๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from
  • fedora 43: newsx 1.6-47.fc43 ยท GPL-2.0-or-later AND Zeeff
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms