snsend,v0.3.8(8)
β¨ snsend, v0.3.8, section 8 β¨
okay bestie, sit DOWN, because this is snsend β from the System Manager's Manual, version v0.3.8 β and it's literally the girl who takes your articles and gets them where they're going. Its sibling snstore is the homebody who just keeps everything local. π«Ά
πΈ NAME πΈ
snsendβ distribute articlessnstoreβ store articles locally
π SYNOPSIS π
snsend [-rvcna]
snstore [-rvcna]
π DESCRIPTION π
So here's the tea. snsend reads articles from descriptor 0 and distributes each one into each newsgroup they are posted to, like inews does. snstore does the same thing but stores them all locally. No cap.
The input articles are expected to be in wire format, which means:
- lines end with
CRLF - leading dots are doubled
- articles are terminated with a lone dot
Control messages are not treated specially. Not even a little. π
The newsgroups list is taken from the X-sn-Newsgroups field if it exists; otherwise it is taken from the Newsgroups field, which must exist or the article will be junked. And listen β all fields whose names begin with X-sn- (case insensitive) are always removed. Every single time. Periodt.
If Date or Message-ID are not present, these are created. The local hosts name is prepended to the Path field. π
If an article is to be junked, it is sent to the junk newsgroup if it exists, otherwise it is discarded. Gone. Poof. β¨
π¦ ROUTING π¦
Okay this part is snsend only, bestie. snstore does not route; it treats all news.groups as though they were local (see Nonexistent newsgroup and Local newsgroup below). And if any of the following fails, snsend aborts.
For each news.group an article is (cross-) posted to, snsend routes the article as follows, aborting if any action fails:
π« Nonexistent newsgroup π«
If /var/spool/sn/news.group is not a directory, snsend ignores this news.group. And if all news.groups are thus ignored, the article is junked. Sorry babe. π
π« Global newsgroup π«
If /var/spool/sn/news.group/.outgoing is a (symlink to a) directory, snsend stores the article into a file in that directory, if the same article does not already exist there (so news.group's upstream feed doesn't get multiple copies of the same article). Such in-transit article files are given names that begin with a $ sign. πΈ
π« Local processing via script π«
Otherwise if /var/spool/sn/news.group/.outgoing is a regular file, it is taken to be a script or program and is run with the article available on its input. See /var/spool/sn/dot-outgoing.ex. π§
π« Local processing via fifo π«
Otherwise if /var/spool/sn/news.group/.outgoing is a fifo, the article is written into it. It is an error if nothing is reading the fifo. (Not me writing into the void π)
π« Local newsgroup π«
Otherwise if /var/spool/sn/news.group/.outgoing does not exist, the article is stored into news.group. The end, it's home. π
π OPTIONS π
Options apply to snsend and snstore equally. Sibling rights. π«Ά
-rβ The article stream is inrnewsbatch format, rather than wire format. Only the#! rnewsform is understood.-cβ If an article already exists in the local newsgroup it is destined for, don't store it there. Forsnsend, this option has no effect on newsgroups that are not local.-aβ (Aliases not allowed.) When storing to multiple local newsgroups, do not alias subsequent copies to the first, instead, make a copy. Aliasing saves disk space, but when the original expires, so do all aliases to it. This option has no effect on newsgroups that are not local.-nβ Don't actually do anything with the article, just dump it back onto descriptor1. It's giving "look but don't touch". π-vβ For each article stored in each newsgroup, output a line to descriptor1similar to whatsnscanwould emit, except that for non-local newsgroups the serial number will always be0.
π FILES π
/var/spool/sn/news.group.name/β This includes/var/spool/sn/=junknewsgroup if it exists. Each such directory represents the newsgroup of the same name, and articles are stored in files1,2,3, etc. beneath it. Each such file contains 1 or more articles. This is contrary to the traditional form of/var/spool/sn/news/group/name.news.group.name./var/spool/sn/news.group/.outgoingβ See also ROUTING above. The presence of this directory indicates thatnews.groupis global, and articles posted tonews.groupend up here in files named$*. These files are linked in already complete, so all such files are ready to be uploaded./var/spool/sn/news.group/.compressβ If this file exists, articles stored innews.groupare candidates for compression. The content of the file is a number representing a minimum article body size below which compression won't be applied. If the file is empty this threshold defaults to1024bytes./var/spool/sn/.meβ If this file exists, it's contents are taken to be the local hosts name for purposes of thePathfield. Otherwise the name is obtained fromgethostname(2).
π ENVIRONMENT VARIABLES π
See also /usr/sbin/dot-outgoing.ex for other variables exported when snsend invokes a .outgoing program.
SNROOTβ If this is set, its value is used in place of/var/spool/sn.
β EXIT CODES β
snsend and snstore exit:
0on success π1on usage error2on system error3on article format error9if/var/spool/sn/news.group/.outgoing(snsendonly) exits with other than0
π SEE ALSO π
/usr/sbin/dot-outgoing.ex, snscan(1)
And that's the whole vibe check, bestie. This page was brought to you by Harold Tay (iykyk, an icon), snsend version v0.3.8, section 8 of the System Manager's Manual. Now go distribute some articles. Slay. π
β¨
π¦ where this page comes from
- debian bookworm: sn 0.3.8-12
- ubuntu jammy: sn 0.3.8-12
- ubuntu noble: sn 0.3.8-12
- ubuntu resolute: sn 0.3.8-12
- ubuntu stonking: sn 0.3.8-12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms