NEWSX(8)
๐ฆ 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
NNTPSERVERenvironment 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
-ffolder,--postedfolder โ 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 ๐ .-llogfile,--loglogfile โ Log information about successfully posted articles to the file indicated.--statstatfile โ A summary of article exchange statistics will be logged to the file indicated.--scanlogsโ Obey locks set by the INNscanlogsutility. This is currently only meaningful for use with a modifiedscanlogsthat understandsnewsxlogs.
๐ OPTIONS FOR NEWS ACCESS
-aauthfile,--authauthfile โ 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 usingAUTHINFO GENERIC. This works by spawning a child process via/bin/shstring, where string is set in the environment variableNNTPAUTH. This process is expected to handle the authentication portion of the connection.-r,--readerโ AMODE READERcommand 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โ NoMODE READERcommand is sent to the remote server. This is the default state when not using--ihave.--readbeforeauthโ Send theMODE READERcommand before attempting to authenticate via anAUTHINFOcommand. Otherwise, it is sent after the authentication. This option will obviously have no effect unless you also specify both--readerand one of--authgenericor--authauthfile. ๐ like, it does nothing on its own, it needs friends.-wchatfile,--chatchatfile โ Use chatfile to control any special connect sequence that may be required before the NNTP protocol is connected. Only implemented for the"telnet"protocol.-xcommand,--execcommand โ 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.-yprogram,--connectprogram โ 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 NNTPIHAVEmechanism for submitting news messages, instead of the defaultPOST. If this is for forwarding news in general, and not necessarily news generated locally, the setting of the--failand--bounceoption should be carefully reviewed. ๐ review those, fr fr.-m,--no-msgidโ Remove anymessage-IDheader field from the posted message. This should cause the receiving end to generate a freshmessage-ID. It should never been used together with--ihave. > bestie do NOT combine this with--ihave, that's chaos ๐.-k,----keep-pathโ Keep thePathwhen posting. In posting mode, thePathis by default stripped together with theNNTP-Posting-HostandXrefheader 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-pathlen โ 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 is1, consistent with a simple, local, newsspool. To disable this feature, set it to an impossibly large value, like999.
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. ๐ซ-eend_tag,--endend_tag โ set a tag in the incoming host state file (peepin.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 โจ-Wwinsize,--windowwinsize โ sets the window size, aka how many outstanding NNTP requests are allowed at any one time. default is10. a value of0disables 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 ๐-bminspool,--sizeminspool โ 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 to1will cause every single newsgroup to land in its own separate spool. ๐๏ธ--rnewsโ pipe incoming messages straight tornewsinstead of dropping them into the in-coming spool. ๐ฐ--pipe-toprogram โ 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-toprogram โ 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 alsoin.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 alsoin.hosts(5). ๐--filterfilterprog โ 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 a335to accept, and a435to reject a message. ๐ง--mfilterfilterprog โ 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 ๐
-Xnum,--maxnewnum โ fetch at most num articles from each new and previously unseen newsgroup. ๐ข--maxartnum โ 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 tonewsx, 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/activefile. see alsoin.hosts(5). ๐งน--minfreeN โ don't fetch news if there are less than N kbytes of free space in the news spool. ๐พ--grouplist โ 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 INNnewsfeeds(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 tohttp://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-postor--no-fetch. specify those switches if desired.
--listlistname โ 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.
--newlistlistname โ 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 thesysornewsfeedsfile. the operation is otherwise as for the--listoption. ๐--descdescname โ 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.
--alldescdescname โ obtain a list of all newsgroups descriptions available from the newsserver to descname. the operation is otherwise as for the--descoption. ๐
๐ญ OPTIONS FOR ERROR HANDLING ๐ญ
-ttimeout,--timeouttimeout โ specify timeout for TCP/IP and lockfile operations, in seconds. the default value is600. โฑ๏ธ--failtime โ 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 suffixessfor seconds,mfor minutes,hfor hours,dfor days andwfor 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. ๐ฅ--bounceaddr โ specify the destination address for messages bounced due to the fail time being exceeded. if addr is specified asnone, 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 ๐
--attachhow โ 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 toinews, inject them into the local spool via the same interface as is used for local new messages. ๐--inews-optionsoptions โ specify command line options for--inews. the leading'-'must be included. the default inews options are"-hOS". โ๏ธ--add-headerheader โ 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 ๐ฆ
--profilefile โ read a newsx profile from file. this file can contain command line options to specify default newsx behaviour. seenewsx.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:
--spoolnamespoolname โ specify a default spoolname. ๐๏ธ--hostnamehostname โ specify a default hostname. ๐--portport โ 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/innshellvarsand obeys it. The whole point is thatnewsxcan roll with the punches when your local newsserver config changes โ dynamic queen behavior ๐--config-isconfigfile โ 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 ๐--homenewshome โ 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 ๐ฆ-sspooldir,--spoolspooldir โ Use spooldir as the news article spool directory instead of the default/var/spool/news. Again โ full path required, don't play games ๐ธ--togotogofile โ Names the C Newstogofile 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๐--batchbatchdir โ 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โจ-hhistorydb,--historyhistorydb โ 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 ๐--activeactivefile โ 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๐--newsfeedsnewsfeedsfile โ Names the newsfeed specification file. This overrides the default in both C News (sys) and INN (newsfeeds) modes. Same filename conventions as--active๐ซถ--incomingincomingdir โ 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๐--inhostsinhostsdir โ 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 atin.hosts(5)โญ--hostconfighostconfigdir โ 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 alsonewin.hosts(5)andnewsx.conf(5)๐ธ
๐ฅ OPTIONS FOR TESTING AND DEBUGGING ๐ฅ
This is where the main character energy gets loud. ๐
--debuglevel โ Sets the debug level. Any level that isn't zero sends reporting tostderrinstead ofsyslog, 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 โ
- Level 2 prints a
-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--debugfor 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.oldfile. 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 ๐--lockslocksdir โ 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 stringnone, 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-postand--no-fetch๐--no-hostlockโ Don't implement thenewsxhost 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 NNTPNEXTcommand. This stopsnewsxfrom attempting to useNEXTto fill in gaps in the article sequence ๐ธ--missing"num" โ Tunes how many missing articles in a row you tolerate before aNEXTcommand gets issued instead of a sequentialSTAT. A value of zero causesNEXTto be used extensively. Default value is0if no window,2if a window is specified ๐--keep-fakeโ Some remote news servers generate faked news articles. Normally you'd wantnewsxto 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$NEWSHOMEif not available.$SPOOLโ If$SPOOLcontains the string"/articles", the incoming host directory$INHOSTSis 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 nolibinn; otherwise ignored.
For C News:
$NEWSBIN$NEWSCTLโ Equivalent to INN's$NEWSHOME.$ACTIVEwill be"$NEWSCTL/active".$HISTORYwill be"$NEWSCTL/history".$NEWSFEEDSwill be"$NEWSCTL/sys".$LOCKSand$PATHETCwill be"$NEWSCTL".$NEWSARTSโ Equivalent to INN's$SPOOL.$BATCHwill be"$NEWSARTS/out.going".$INCOMINGwill be"$NEWSARTS/in.coming".$INHOSTSwill 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, orFrom-field if noSenderis 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-msgidwill 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-pathoption 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 error2โ Incorrect arguments supplied.3โ Error connecting to remote host4โ NNTP Protocol error5โ 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-qdid 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. Seenewsx.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.Tis the current Unix time,$$is the process ID, and,Sis 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 ๐
newsq(1),in.hosts(5)- C News:
news(5),newsdb(5),newssys(5),rnews(8) - INN:
rnews(1),inews(1),wildmat(3),active(5),history(5),newsfeeds(5),ctlinnd(8) - RFC-977 - Network News Transfer Protocol (NNTP)
- RFC-1036 - Usenet Article Format
- http://www.kvaleberg.com/ISP-Hookup-HOWTO.html
- http://www.kvaleberg.com/newsx.html
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
- Copyright 1996,1997,1998 Egil Kvaleberg, egil@kvaleberg.no
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms