Each news article is stored in a separate file
with one or more links,
each a numeric name
in a directory under
/var/news corresponding to a newsgroup
the article is (cross-)posted to.
an article posted to
comp.unix.wizards might be stored in
/var/lib/news/active defines the locally-valid news groups
contains one line per group.
Each line consists of four blank-separated fields:
highest local article number assigned,
lowest local article number in use (approximately),
Both article-number fields are at least five digits wide.
(Some older news software may expect exactly five digits.)
The current flag values are
y (a normal unmoderated group),
y but local postings disallowed),
m (a normal moderated group),
x (a locally-disabled group,
no articles will be filed here),
= (followed by the real group
under which to file articles in this group;
articles are treated exactly as if their
Newsgroups: header specified the real group instead of the original one;
highest and lowest fields are ignored).
/var/lib/news/active.times is an extension of the
active file that records the arrival of new newsgroups by time and creator.
When a new newsgroup is created,
the group name,
time of group creation
(as seconds since January 1, 1970,
and mail address of the creator
are appended as a single line.
The file must always be sorted in increasing order
of the creation-time field.
The news software only appends to the file,
which normally suffices to ensure this.
active.times for already existing newsgroups,
with all times equal to the time of its creation
and all creators unknown,
can be built using
Active.times provides a quick
way for newsreaders to tell when new groups have arrived,
without weird heuristics and expensive schemes
like storing old lists of
newsgroups and comparing them to the
/var/lib/news/history contains one line for each article received.
Each line consists of three tab-separated fields:
Message-ID:, a complex middle field,
the list of links to this article.
The links are separated by blanks and are given as pathnames relative to
/var/news, except that all the /s except the last one (between the
last component of the newsgroup name and the numeric article name)
are replaced by .s.
If an article has been expired or cancelled without being seen first,
the list of links and the tab before it are omitted.
history field potentially has several subfields separated by tilde (~).
Currently only three are defined:
the arrival date, the expiry date,
and an optional article size in bytes.
The arrival date is a
in Unix a
time_t is a count of seconds since the GMT beginning of 1970)
expressed as a decimal integer.
The expiry date is another decimal
time_t, or the contents of the
Expires: header from the message,
or - indicating that there was no explicit expiry date given.
There are also index files to permit rapid
history lookup by message-id,
Also usually present now are
overview files, one per newsgroup;
for more detail on them.