site read|xfer|both|no post|no [!exceptgroups]如果客户端连接到 NNTP 端口,nntpd 会尝试通过反向查找从其 IP 地址获取主机的完全限定域名。客户端的主机名和 IP 地址会根据文件中条目的出现顺序,逐个与每个条目的 site 字段进行检查。匹配可以是部分匹配或完全匹配。如果条目完全匹配,则应用该条目;如果匹配是部分匹配,则仅当后面没有至少同样好的匹配时才应用。site 可以用以下方式之一指定
第二个和第三个字段描述了授予客户端的访问权限。第二个字段详细说明了通过拉取 (read) 检索新闻和通过推送 (xfer) 传输新闻的权限。值为 both 表示两者都启用,no 表示完全拒绝访问。第三个字段授予客户端发布文章的权利,即提交带有不完整头部信息的文章,这些信息将由新闻软件完成。如果第二个字段包含 no,则忽略第三个字段。
第四个字段是可选的,包含一个逗号分隔的组列表,客户端被拒绝访问这些组。
下面显示了一个 nntp_access 文件的示例
# # by default, anyone may transfer news, but not read or post default xfer no # # public.vbrew.com offers public access via modem, we allow # them to read and post to any but the local.* groups public.vbrew.com read post !local # # all other hosts at the brewery may read and post *.vbrew.com read post