snntpd,v0.3.8(8)

πŸŽ€ snntpd β€” the tiny news server that could πŸ’…

okay bestie, so this is the manual page for snntpd, version 0.3.8, and it lives in section 8 of the System Manager's Manual (that's the sysadmin-y section, iykyk). It's a small news server. That's literally it. Small. News. Server. Let's get into it. ✨


✨ NAME ✨

snntpd β€” a small news server πŸ¦‹


🌸 SYNOPSIS 🌸

snntpd [-t timeout] [-P] [-S] [logger...]

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: snntpd is a small news server. Tiny. Compact. Iconic. But she does not run herself, okay? She needs a grown-up to launch her:

  • you run her under inetd or tcpserver
  • as root, or as the owner of /var/spool/sn
  • she does not fork into the background β€” no disappearing acts, she stays right there 🫢
  • she expects to read and write from and to the network on descriptors 0 and 1

that's the whole setup. no daemon drama. periodt.


🌈 ARGUMENTS 🌈

  • logger... β€” usually /usr/bin/logger β€” this gets treated as a logging program, and all log output gets piped straight into it. If you don't specify logger..., then log messages go to descriptor 2 instead. pick your fighter πŸ’€

πŸ‘‘ OPTIONS πŸ‘‘

  • -t timeout β€” tells snntpd how long to wait for input before she gives up and exits. the timeout is in seconds, and the default is 600. she's patient, but not that patient 🧚
  • -P β€” makes snntpd include her pid</> in the log output. receipts, basically πŸ“
  • -S β€” Suppress the NNTP greeting on startup. super useful if you wanna do authentication before running snntpd, or if you want to serve your own greeting from a wrapper. main character energy: you do the talking, not her πŸ’…

πŸ“ POSTING AND POSTING PERMISSIONS πŸ“

okay so posting is usually handled externally by the /usr/sbin/SNPOST script. that script is the one doing the heavy lifting:

  • fine-grain posting control
  • handling of control messages
  • the ultimate distribution of the posted article

snntpd herself permits or denies posting in a very simple manner. here's the whole flowchart, no notes:

  • If /var/spool/sn/.nopost exists, posting is not allowed. 🚫
  • Otherwise, if the environment variable POSTING_OK is not set, posting is not allowed.
  • Otherwise if POSTING_OK is set (to the empty string), posting is generally allowed, and all POSTed articles are piped to the SNPOST script, which has the final say in the matter. the value of $POSTING_OK is not currently used, but is reserved. she's holding that seat for later, bestie πŸŽ€

πŸ¦‹ FILES πŸ¦‹

  • /var/spool/sn/.fifo β€” if this file exists, and is a fifo, snntpd will write the name of a newsgroup into it as that newsgroup becomes the current one. if the fifo does not exist, snntpd will not create it. she doesn't do DIY πŸ› οΈ
  • /var/spool/sn/.noservice β€” if this file exists, snntpd will display its first line and exit. if the file can't be read or is empty, a default message is displayed. this is useful for temporarily disabling the news server while you perform any maintenance. go take your lil break, queen 😌
  • /var/spool/sn/.nopost β€” see POSTING PERMISSIONS above. ⬆️
  • /var/spool/sn/.SNPOST β€” if this script or program exists, it is invoked instead of SNPOST to accept a posted article. the understudy ate πŸ”₯
  • /var/spool/sn/news.group.name/.nopost β€” okay these files really belong to SNPOST, and it is unfortunate that snntpd has to check for their existence to determine the posting flag for the LIST command. see /usr/sbin/SNPOST. it's giving codependency ngl 😭
  • /var/spool/sn/news.group.name/.info β€” if this file exists, its first line is taken as the description of that group, for use with the LIST NEWSGROUPS command. πŸ’¬
  • /var/spool/sn/news.group.name/.times β€” is a binary file containing entry times, to support the NEWNEWS command. ⏰
  • /var/spool/sn/news.group.name/.created β€” is an empty file retained for its timestamp, to support the NEWGROUPS command. πŸ“…

🌟 SIGNALS 🌟

If snntpd catches SIGHUP, the files /var/spool/sn/{.fifo,.noservice,.nopost} (see below) are checked again, just like they are during startup. she's re-reading the room πŸ‘€

Other signals have default behaviour. no special treatment, no extra flair πŸ’€


πŸ’œ ENVIRONMENT VARIABLES πŸ’œ

See also /usr/sbin/SNPOST for a list of environment variables exported by snntpd. she hands off the whole group chat.

  • PATH β€” the PATH must be set such that snntpd can find SNPOST in order to accept postings. if PATH does not include /usr/sbin, then /usr/sbin will be appended to it. she'll find her way home 🏑
  • POSTING_OK β€” this variable helps determine the site-wide posting policy. see POSTING PERMISSIONS above. ⬆️
  • TCPREMOTEIP β€” if this value is set, it is taken to be the dotted-quad IP address of the connecting client. if it is not set, snntpd attempts to derive it for herself, and then set its value. self-sufficient icon ✨
  • TCPLOCALIP β€” as above, but for the server's dotted-quad IP. πŸ–₯️
  • SNROOT β€” if this is set and is not empty, the value is used everywhere in place of /var/spool/sn, the default news spool directory. relocate the whole kingdom, slay πŸ‘‘

🌈 SEE ALSO 🌈


N.B. β€” this page was written by Harold Tay, and it's from snntpd,v0.3.8(8). that's the version, bestie. that's the whole lore. πŸ«ΆπŸ’–

thanks for reading the whole thing, you absolute legend β€” go run a news server, no cap 🌸✨

πŸ“¦ where this page comes from