This file is indexed.

/usr/share/doc/HOWTO/ja-html/Offline-News-mini-HOWTO-5.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>Offline-News-mini-HOWTO: nntpd</TITLE>
 <LINK HREF="Offline-News-mini-HOWTO-4.html" REL=previous>
 <LINK HREF="Offline-News-mini-HOWTO.html#toc5" REL=contents>
</HEAD>
<BODY>
¼¡¤Î¥Ú¡¼¥¸
<A HREF="Offline-News-mini-HOWTO-4.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Offline-News-mini-HOWTO.html#toc5">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s5">5. nntpd</A></H2>

<P>¤³¤Î¾Ï¤Ç¤Ï¡¢nntpd ¤Î¥¤¥ó¥¹¥È¡¼¥ë¡¢ÀßÄê¡¢gnspool, gninews ¤È¤ÎÏ¢·¸¤Ë¤Ä¤¤¤Æ²òÀ⤷
¤Þ¤¹¡£
<P>
<P>
<H2><A NAME="ss5.1">5.1 ¥¤¥ó¥¹¥È¡¼¥ë</A>
</H2>

<P>ŬÅö¤Ê¥Ç¥£¥ì¥¯¥È¥ê¤Ë nntpd ¤Î¥½¡¼¥¹¤òŸ³«¤·¤Þ¤¹¡£
<P>
<P>¤Þ¤º¡¢<CODE>nntp.1.5.11t/common/conf.h</CODE> ¤òÊÔ½¸¤·¤Þ¤¹¡£Æä˥ǥ£¥ì¥¯¥È¥ê´Ø·¸¤ÎÀß
Äê¤Ï¡¢gnspool ¤Ç¤ÎÀßÄê¤ÈÌ·½â¤·¤Ê¤¤¤è¤¦¤Ë¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£»ä¤Ï¼¡¤Î¤è¤¦¤Ë¤·¤Þ
¤·¤¿¡£
<HR>
<PRE>
#define DBM
#undef DBZ
#define CNEWS
#define GHNAME
#undef  UUNAME
#define STAT_FILE      "/usr/lib/news/mgdstats"
#define NGDATE_FILE    "/usr/lib/news/groupdates"
#define ACTIVE_FILE    "/usr/lib/news/active"
#define ACCESS_FILE    "/usr/lib/news/nntp_access"
#define DISTRIBUTIONS_FILE     "/usr/lib/news/distributions"
#define NEWSGROUPS_FILE        "/usr/lib/news/newsgroups"
#define HISTORY_FILE   "/usr/lib/news/history"
#define INEWS          "/usr/lib/news/inews"
#define POSTER         "news"
</PRE>
<HR>
<P>
<P>¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï dbz ¥é¥¤¥Ö¥é¥ê¤ò»È¤¦¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤ò¡¢dbm ¥é¥¤¥Ö¥é¥ê¤ò»È¤¦¤è
¤¦¤ËÊѹ¹¤·¤Æ¤¤¤Þ¤¹¡£dbz ¥é¥¤¥Ö¥é¥ê¤Î¤¢¤ë¿Í¤Ï¡¢¤½¤Î¤Þ¤Þ¤Ç¹½¤¤¤Þ¤»¤ó¡£Êѹ¹¤·¤¿¾ì¹ç
¤Ï¡¢<CODE>Makefile</CODE> ¤âÊѹ¹¤·¤Þ¤¹¡£
<P>
<P>¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï <CODE>/etc/uucpname</CODE> ¤ò»²¾È¤·¤Æ¥Û¥¹¥È¤Î̾Á°¤ò²ò·è¤¹¤ë¤è¤¦¤Ë¤Ê¤Ã
¤Æ¤¤¤Þ¤¹¤«¤é¡¢gethostname() ¤ò»È¤Ã¤Æ²ò·è¤¹¤ë¤è¤¦¤ËÊѹ¹¤·¤Þ¤·¤¿¡£
<P>
<P>ÊÔ½¸¤¬½ª¤Ã¤¿¤é¡¢<CODE>make server</CODE> ¤ò¼Â¹Ô¤·¤Æ nntpd ¤òÀ¸À®¤·¤Æ²¼¤µ¤¤¡£»ä¤Î¤È¤³
¤í¤Ç¤Ï <CODE>nntp.1.5.11t/server/timer.c</CODE> ¤ËÊѹ¹¤¬É¬ÍפǤ·¤¿¡£124¹ÔÌܤΠ
select() ´Ø¿ô¤¬¤ª¤«¤·¤¤¤È¤¤¤ï¤ì¤¿¤Î¤Ç¡¢
<HR>
<PRE>
#if 1 /* Was EXECLAN */
    n = select(fileno(stdin) + 1,&amp;readfds, (fd_set*)0, (fd_set*)0, timeout);
#else
</PRE>
<HR>

¤ÈÊѹ¹¤·¤Þ¤·¤¿¡£
<P>
<P>¼¡¤Ë¡¢root ¤Ë¤Ê¤Ã¤Æ <CODE>/usr/sbin/</CODE> ¤Ë nntpd ¤ò¥³¥Ô¡¼¤·¤Þ¤¹¡£
<P>
<P>
<P>
<H2><A NAME="ss5.2">5.2 ¥Ë¥å¡¼¥¹¤òÆɤि¤á¤ÎÀßÄê</A>
</H2>

<P><CODE>/etc/inetd.conf</CODE> ¤ò½¤Àµ¤·¤Æ¡¢nntpd ¤¬µ¯Æ°¤µ¤ì¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£¼¡¤Î1¹Ô¤òÉÕ
¤±²Ã¤¨¤ë¤«¡¢½¤Àµ¤·¤Æ²¼¤µ¤¤¡£
<HR>
<PRE>
nntp    stream  tcp     nowait  news    /usr/sbin/tcpd  nntpd
</PRE>
<HR>
<P>
<P>¼¡¤Ë¡¢<CODE>/usr/lib/news/nntp_access</CODE> ¤òºîÀ®¤·¤Þ¤¹¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ç¡¢nntp ¤Ë¤è
¤ë¥¢¥¯¥»¥¹¤òµö²Ä¤¹¤ë¥Û¥¹¥È¤òÀßÄꤷ¤Æ¤¤¤Þ¤¹¡£¤È¤ê¤¢¤¨¤º¤Ï¡¢¼¡¤Î¤è¤¦¤ÊÀßÄê¤Ç¤è¤¤¤Ç
¤·¤ç¤¦¡£
<HR>
<PRE>
default      no    no
localhost    read  post
</PRE>
<HR>
<P>
<P>¤³¤³¤Þ¤Ç¤ÎÀßÄê¤Ç¥Ë¥å¡¼¥¹¤òÆɤá¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£´Ä¶­ÊÑ¿ô NNTPSERVER ¤ò 
localhost ¤ËÀßÄꤷ¤Æ mnews ¤Ê¤É¤ÇÆɤó¤Ç¤ß¤Þ¤·¤ç¤¦¡£
<P>
<P>Æɤá¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢<CODE>telnet localhost nntp</CODE>¤È¤·¤Æ¡¢È¿±þ¤ò¸«¤Æ²¼¤µ¤¤¡£
"Can't talk to you" ¤È¤¤¤ï¤ì¤¿¾ì¹ç¤Ï <CODE>nntp_access</CODE> ¤ÎÀßÄ꤬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹¡£
<CODE>/var/log/messages</CODE> ¤ä <CODE>/var/log/syslog</CODE> ¤Ë¥¨¥é¡¼¤Î¾ðÊ󤬻ĤäƤ¤
¤ë¤È»×¤¤¤Þ¤¹¤Î¤Ç¡¢»²¹Í¤Ë¤·¤Æ²¼¤µ¤¤¡£
<P>
<P>
<P>
<H2><A NAME="ss5.3">5.3 ¥Ë¥å¡¼¥¹¤òÅê¹Æ¤¹¤ë¤¿¤á¤ÎÀßÄê</A>
</H2>

<P>¼¡¤Î¤è¤¦¤ÊÆâÍƤΥ¹¥¯¥ê¥×¥È <CODE>/usr/lib/news/inews</CODE> ¤òºîÀ®¤·¤Þ¤¹¡£
<HR>
<PRE>
#!/bin/sh
/usr/lib/news/bin/gninews
</PRE>
<HR>
<P>
<P>¤³¤ì¤À¤±¤Ç¡¢Åê¹Æ¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£¥Ë¥å¡¼¥¹¥ê¡¼¥À¡¼¤«¤éÅê¹Æ¤Î¥Æ¥¹¥È
¤ò¤·¤Æ²¼¤µ¤¤¡£¤¹¤ë¤È¡¢<CODE>/var/spool/news/news.out/gn??????</CODE> ¤È¤¤¤¦¥Õ¥¡¥¤¥ë
¤ËÅê¹Æ¤·¤¿µ­»ö¤¬¥¹¥×¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£¼¡¤Ë¡¢
<HR>
<PRE>
su news -c "gnspool -py -h news.server"
</PRE>
<HR>

¤ò¼Â¹Ô¤¹¤ì¤Ð¡¢¼ÂºÝ¤Ë¥Ë¥å¡¼¥¹¥µ¡¼¥Ð¡¼¤Ëµ­»ö¤¬Åê¹Æ¤µ¤ì¤Þ¤¹¡£(¤³¤Î¾ì¹ç¤â¡¢NNTP
Server ¤ÏÌÀ¼¨Åª¤Ë»ØÄꤷ¤Æ²¼¤µ¤¤¡£)
<P>
<P>
<P>
<H2><A NAME="ss5.4">5.4 From: ¹Ô¤Ë¤Ä¤¤¤Æ</A>
</H2>

<P>gnspool ¤Çµ­»ö¤òÅê¹Æ¤¹¤ë¾ì¹ç¡¢¥¹¥×¡¼¥ë»þ¤Î From: ¤Ï̵»ë¤µ¤ì¡¢.gnrc ¤ÎÀßÄê
¤òÍѤ¤¤Æ¼¡¤Î¤è¤¦¤ËÊѹ¹¤µ¤ì¤Þ¤¹¡£<BR>
[Ãí. gn-1.40 ¤«¤é¥¹¥×¡¼¥ë»þ¤Î From: ¤ò»È¤¦¤è¤¦¤Ë gnspool ¤Ë¶¯À©¤¹¤ë¤³¤È¤¬½Ð
Íè¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£gn(1) ¤Î¥ª¥×¥·¥ç¥ó SUBSTITUTE_HEADER ¤Ë¤Ä¤¤¤Æ¤ÎÀâÌÀ¤ò»²¾È
¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤òŬÀÚ¤ËÀßÄꤹ¤ë¤È¡¢¸å½Ò¤Î impost ¤ËÍê¤é¤º¤Ë From: 
¤ò»È¤¤Ê¬¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£]
<P>
<HR>
<PRE>
From: news@mydomain.or.jp (Hoge Hoge)
</PRE>
<HR>
<P>
<P>̾Á°¤È¥É¥á¥¤¥ó̾¤Ï <CODE>.gnrc</CODE> ¤ÎÀßÄ꤬»È¤ï¤ì¡¢gnspool ¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¥¢¥«¥¦¥ó
¥È (news) ¤ÈÁȤ߹ç¤ï¤»¤Æ¡¢From: ¤¬À¸À®¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£½¾¤Ã¤Æ¡¢Á÷¿®¼Ô¤ò
ÌÀ¼¨¤·¤¿¤¤¾ì¹ç¤Ï¡¢Sender: ¤ä Reply-To: ¤Ê¤É¤Î¥Ø¥Ã¥À¤òÍøÍѤ·¤Æ²¼¤µ¤¤¡£
<P>
<P>news@mydomain.or.jp ¤¬¡¢¼«Ê¬¤È¤Ï´Ø·¸¤Ê¤¤¿Í¤Î¥á¡¼¥ë¥¢¥É¥ì¥¹¤È¤Ê¤Ã¤ÆÅԹ礬°­¤¤¾ì¹ç
¤Ë¤Ï¡¢´Ä¶­ÊÑ¿ô LOGINNAME ¤¬ÍøÍѤǤ­¤Þ¤¹¡£Î㤨¤Ð¡¢¼¡¤Î¤è¤¦¤Ê¥¹¥¯¥ê¥×¥È¤òÍѤ¤¤ë¤È¡¢
<HR>
<PRE>
#!/bin/bash
export NEWSLIB=/usr/lib/news
export NEWSSPOOL=/var/spool/news
export LOGINNAME=hogehoge
gnrc=$NEWSLIB/.gnrc
export NNTPSERVER=$(/usr/bin/awk '/^NNTPSERVER/ {print $2}' $gnrc)
/usr/lib/news/bin/gnspool -py
</PRE>
<HR>

¥¢¥«¥¦¥ó¥È̾¤ÎÂå¤ï¤ê¤Ë´Ä¶­ÊÑ¿ô LOGINNAME ¤¬»È¤ï¤ì¡¢
<HR>
<PRE>
From: hogehoge@mydomain.or.jp (Hoge Hoge)
</PRE>
<HR>

¤È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
<P>
<P>
<P>
<H2><A NAME="ss5.5">5.5 impost ¤ÎÍøÍÑ</A>
</H2>

<P>¤É¤¦¤·¤Æ¤â From: ¤ò»È¤¤Ê¬¤±¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢impost ¤È¤¤¤¦ Perl ¤Î¥¹¥¯¥ê¥×¥È¤¬¤¢¤ê¤Þ
¤¹¡£gnspool ¤ÎÂå¤ï¤ê¤ËÅê¹ÆÍѤΥ¹¥¯¥ê¥×¥È¤È¤·¤Æ»È¤¨¤Ð¡¢¥¹¥×¡¼¥ë¤·¤¿»þ¤Î From: ¤ò
»È¤Ã¤ÆÅê¹Æ¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡£ºÇ¿·¥Ð¡¼¥¸¥ç¥ó¤Ï 0.99i ¤Ç¡¢
<A HREF="ftp://falcon.econ.kyoto-u.ac.jp/pub/dist/impost/">ftp://falcon.econ.kyoto-u.ac.jp/pub/dist/impost/</A> ¤Ç¼ê¤ËÆþ¤ê¤Þ¤¹¡£<BR>
[
¤³¤Î¹à¤Ï fj.os.linux ¤ËÅê¹Æ¤µ¤ì¤¿¼¡¤Îµ­»ö¤ò»²¹Í¤È¤·¤Æ½ñ¤«¤ì¤Þ¤·¤¿¡£
<UL>
<LI>Message-ID: &lt;5lh4km$s68$1@horse.fsinet.or.jp&gt;</LI>
<LI>Message-ID: &lt;5lid4e$gvj$1@horse.fsinet.or.jp&gt;</LI>
</UL>

¤ª¤ª¤Ä¤«¤µ¤ó¤Ë´¶¼Õ¤·¤Þ¤¹¡£
]
<P>
<P>¼ÂºÝ¤Ë impost ¤ò»È¤¦¼ê½ç¤Ë¤Ä¤¤¤Æ²òÀ⤷¤Þ¤¹¡£impost ¤ò 
<CODE>/usr/lib/news/bin/</CODE> ¤Ë¥³¥Ô¡¼¤·¤Æ²¼¤µ¤¤¡£¤½¤Î»þ¡¢ÀèƬ¹Ô¤Î perl ¤Î¥Ñ¥¹¤ò¥·
¥¹¥Æ¥à¤Ë¹ç¤ï¤»¤ÆÊѹ¹¤·¡¢¼Â¹Ôµö²Ä°À­¤òÍ¿¤¨¤Æ¤ª¤­¤Þ¤¹¡£¼¡¤Ë¡¢´Ä¶­ÀßÄê¥Õ¥¡¥¤¥ë 
<CODE>/usr/lib/news/.impostrc</CODE> ¤òÍÑ°Õ¤·¤Þ¤¹¡£»ä¤Ï¼¡¤Î¤è¤¦¤ÊÆâÍƤˤ·¤Þ¤·¤¿¡£
<P>
<HR>
<PRE>
config: default
option: -SMTPservers mail.server
option: -NNTPservers news.server
option: -noESMTP
option: -NewsPost
option: -User hogehoge
option: -Name Hoge Hoge
option: -NameInComment
option: -Org dokoka
option: -FromDomain mydomain.or.jp
option: -noMsgId
option: -noDate
option: -noNScmpl
option: -noMIMEbcc
option: -noNewsCheck
option: -Lines 3000
option: -JustQueuing
option: -ObeyHeader
option: -h
config: post
option: -noVerbose
option: -ProcessQueue
</PRE>
<HR>
<P>
<P><CODE>/usr/lib/news/inews</CODE> ¤òÊѹ¹¤·¤Æ¡¢gninews ¤ÎÂå¤ï¤ê¤Ë impost ¤¬µ¯Æ°¤µ¤ì¤ë
¤è¤¦¤Ë¤·¤Æ¤ª¤­¤Þ¤¹¡£
<P>
<P>¥Ë¥å¡¼¥¹¥ê¡¼¥À¡¼¤È¤·¤Æ mnews ¤òÍøÍѤ·¤Æ¤¤¤ë¾ì¹ç¡¢¥á¥Ã¥»¡¼¥¸¤Ë Path: ¥Ø¥Ã¥À¤¬ÉÕ²Ã
¤µ¤ì¤Þ¤¹¤¬¡¢impost ¤Ï Path: ¤Î¤Ä¤¤¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¤ò invalid ¤Ê¤â¤Î¤È¸«¤Ê¤·¤Þ¤¹¡£
¤³¤ì¤ò²óÈò¤¹¤ë¤¿¤á¡¢impost ¤Î275¹ÔÌÜÉÕ¶á¤Î
<HR>
<PRE>
 &amp;&amp; !&amp;header_value("Path")
</PRE>
<HR>

¤È¤¤¤¦¹Ô¤ò¥³¥á¥ó¥È¥¢¥¦¥È¤·¤Æ¤ª¤­¤Þ¤¹¡£
<P>
<P>¤³¤ì¤Ç½àÈ÷¤Ç¤­¤¿¤Ï¤º¤Ç¤¹¡£¥Æ¥¹¥ÈÅê¹Æ¤ò¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£¥ª¥Õ¥é¥¤¥ó¤Î¾õÂÖ¤ÇÅê¹Æ¤¹¤ë
¤È¡¢<CODE>/usr/lib/news/.imqueue/</CODE> ¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê¤Ëµ­»ö¤¬¥¹¥×¡¼¥ë¤µ¤ì¤Þ¤¹¡£
¤½¤Î¸å¡¢
<HR>
<PRE>
su news -c "/usr/lib/news/bin/impost -config post"
</PRE>
<HR>

¤È¤¤¤¦¥³¥Þ¥ó¥É¤òȯ¹Ô¤¹¤ë¤È¡¢¼ÂºÝ¤Ëµ­»ö¤¬Á÷¿®¤µ¤ì¤Þ¤¹¡£
<P>
<P>¾åµ­¤ÎÀßÄê¤Ç impost ¤òÍøÍѤ·¤¿¾ì¹ç¡¢¥Ø¥Ã¥À¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
<P>
<HR>
<PRE>
Newsgroups: test
Subject: test
From: someone@myhost.mydomain.or.jp (Someone)
Path: someone
X-Newsreader: mnews [version 1.19] 1995-07/21(Fri)
Organization: dokoka
Originator: hogehoge@mydomain.or.jp (Hoge Hoge)
X-Dispatcher: impost version 0.99i (Apr. 6, 1997)
Lines: 1
</PRE>
<HR>
<P>
<P>¤³¤ÎÆâ¡¢Organization:, Originator:, X-Dispatcher:, Lines: ¤Î³Æ¥Ø¥Ã¥À¤¬ impost ¤Ë
¤è¤Ã¤ÆÉղ䵤줿¥Ø¥Ã¥À¤Ç¤¹¡£From: ¤Ë¤Ïµ­»ö¤Ç»ØÄꤷ¤¿ From: ¤¬»È¤ï¤ì¡¢Originator: 
¤Ë¤è¤Ã¤ÆÅê¹Æ¤·¤¿¿Í¤¬³ÎÄꤵ¤ì¤Þ¤¹¡£
<P>
<HR>
¼¡¤Î¥Ú¡¼¥¸
<A HREF="Offline-News-mini-HOWTO-4.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Offline-News-mini-HOWTO.html#toc5">Ìܼ¡¤Ø</A>
</BODY>
</HTML>