contents
下一个: sendsysversion, 和 senduuname 上一级: 控制消息 上一个: newgroup 和 rmgroup

检查群组消息

检查群组消息由新闻组管理员发送,目的是使网络内的所有站点将其活动文件与 Usenet 的实际情况同步。例如,商业互联网服务提供商可能会向其客户的站点发送此类消息。 主要层级的“官方”检查群组消息每月由其版主发布到 comp.announce.newgroups。 然而,它作为普通文章发布,而不是作为控制消息。 要执行检查群组操作,请将此文章保存到文件,例如 /tmp/check,删除控制消息本身开头之前的所有内容,然后使用以下命令将其馈送到 checkgroups 脚本
           #   su   news  -c  "/usr/lib/news/bin/ctl/checkgroups"  <
           /tmp/check

这将更新您的新闻组文件,添加 localgroups 中列出的组。旧的新闻组文件将被移动到 newsgroups.bac。 请注意,在本地发布消息很少会起作用,因为 inews 拒绝接受如此大的文章。

如果 C-News 发现检查群组列表和活动文件之间存在不匹配,它将生成一个命令列表,使您的站点保持最新,并通过邮件将其发送给新闻组管理员。 输出通常如下所示

           From news Sun Jan 30 16:18:11 1994
           Date: Sun, 30 Jan 94 16:18 MET
           From: news (News Subsystem)
           To: usenet
           Subject: Problems with your active file

           The following newsgroups are not valid and should be removed.
                   alt.ascii-art
                   bionet.molbio.gene-org
                   comp.windows.x.intrisics
                   de.answers

           You can do this by executing the commands:
                    /usr/lib/news/bin/maint/delgroup alt.ascii-art
                    /usr/lib/news/bin/maint/delgroup bionet.molbio.gene-org
                    /usr/lib/news/bin/maint/delgroup comp.windows.x.intrisics
                    /usr/lib/news/bin/maint/delgroup de.answers

           The following newsgroups were missing.
                   comp.binaries.cbm
                   comp.databases.rdb
                   comp.os.geos
                   comp.os.qnx
                   comp.unix.user-friendly
                   misc.legal.moderated
                   news.newsites
                   soc.culture.scientists
                   talk.politics.crypto
                   talk.politics.tibet

当您从新闻系统收到类似这样的消息时,不要盲目相信它。 根据发送检查群组消息的人员,它可能缺少一些组甚至整个层级结构; 因此,您在删除任何组时应谨慎。 如果您发现列为缺失的组是您想要在站点上保留的组,则必须使用 addgroup 脚本添加它们。 将缺失组的列表保存到文件,并将其馈送到以下小脚本

           #!/bin/sh
           cd /usr/lib/news

           while read group; do
               if grep -si "^$group[[:space:]].*moderated" newsgroup; then
                   mod=m
               else
                   mod=y
               fi
               /usr/lib/news/bin/maint/addgroup $group $mod
           done



Andrew Anderson
Thu Mar 7 23:22:06 EST 1996