要安装 C-News,如果您还没有这样做,请将文件解压到它们应有的位置,并编辑下面列出的配置文件。它们都位于 /usr/lib/news 目录下。它们的格式将在以下章节中描述。
1. There may be a difference between the groups that exist at your site, and those that your site is willing to receive. For example, the subscription list may specify comp.all, which means all newsgroups below the comp hierarchy, but at your site, only a number of comp groups are listed in active. articles posted to those groups will be moved to junk. 2. Note that this should be the crontab of news, in order not to mangle file permissions.
ME:all/all:: moria/moria.orcnet.org:all/all,!local:f:
# cp active active.old # sed 's/ [0-9]* [0-9]* / 0000000000 00001 /' active.old > active # rm active.old
第二个命令是对 sed(1) 的调用,sed(1) 是我最喜欢的命令之一。此调用将两个数字字符串分别替换为零字符串和字符串 000001。
最后,创建新闻 spool 目录以及用于传入和传出新闻的子目录
# cd /var/spool # mkdir news news/in.coming news/out.going # chown -R news.news news # chmod -R 755 news
如果您使用的是更高版本的 C-News,您可能还需要在新闻 spool 目录中创建 out.master 目录。
如果您使用的 newsreader 来自与您正在运行的 C-News 不同的发行版,您可能会发现有些 newsreader 期望新闻 spool 位于 /usr/spool/news 而不是 /var/spool/news 中。如果您的 newsreader 似乎找不到任何文章,请创建从 /usr/spool/news 到 /var/spool/news 的符号链接。
现在,您已准备好接收新闻。请注意,您不必创建除上面所示目录之外的任何目录,因为每次 C-News 从尚无 spool 目录的组接收到文章时,它都会创建该目录。
特别是,这种情况会发生在文章已交叉发布到的所有组。因此,过一段时间后,您会发现您的新闻 spool 目录中堆满了您从未订阅过的新闻组目录,例如 alt.lang.teco。您可以通过从 active 中删除所有不需要的组,或者通过定期运行 shell 脚本来删除 /var/spool/news 下的所有空目录(当然,除了 out.going 和 in.coming)。
C-News 需要一个用户来发送错误消息和状态报告。默认情况下,这是 usenet。如果您使用默认值,则必须为其设置一个别名,该别名将其所有邮件转发给一个或多个负责人。(章节- 和-
解释了如何为 smail 和 sendmail 执行此操作)。您也可以通过将环境变量 NEWSMASTER 设置为适当的名称来覆盖此行为。您必须在 news 的 crontab 文件中执行此操作,以及每次手动调用管理工具时执行此操作,因此安装别名可能更容易。
当您修改 /etc/passwd 时,请确保每个用户在密码文件的 pw_gecos 字段(这是第四个字段)中都有她的真实姓名。Usenet 网络礼仪要求发送者的真实姓名出现在文章的 From: 字段中。当然,当您使用 mail 时,您无论如何都会这样做。