rkt logo

INN FAQ Part 4

NOTE: The maintainers of the INN FAQ stopped publishing in December 1997.
An important update to this topic is provided by Mib Software in the Usenet RKT for Subscribers.

Subject: (4.9) Make sure that clients can post.


The "inews" command (usually in /usr/local/bin) takes a post from a
user, adds any missing headers, appends the file
"~/.signature" (see below), and possibly replaces any headers that
are obviously forged. "inews" will also reject a message if the
message is seriously botched. "inews -h" expects a post on stdin
beginning with headers, then a blank line, then the body. "inews -h
-D" doesn't post the message, but outputs what it would have posted.
The minimum headers one can feed is "Newsgroups:" (which is plural) and
"Subject:" (which is singular).

The "~/.signature" handling has some specific rules: INN's inews exits
with an error if ~/.signature is (1) more than 4 lines long, (2)
exists, but is not readable, or (3) is longer than 4k chars. inews
exits with an error (rather than silently reading only the first 4
lines) to avoid a flurry of posts asking, "Why did my .signature get cut off?"

By the way, a header looks like "Header-Name: data". That is, after
the header name there is exactly one colon then exactly one space. The
space is a space, not a tab. Another picky detail is that list of
newsgroups on the "Newsgroups:" line is a comma separated list, with no
spaces. There are no spaces before the colon. If there is nothing
after the colon or if there is only whitespace after the colon then
that header will be removed by "inews". Sites that don't remove such
"empty" headers have broken software. Get it? Got it? Good.

Here's the test message I constantly use:
------------------------ cut here 8<
inews -h -D
Newsgroups: foo.test
Subject: test of inn posting

this is a test
------------------------ cut here 8<

Exciting huh?

You might also use the 'feedone' program in the frontends directory.
Do "cd $inn/frontends ; make feedone" to get it built. To run it, do

		feedone -t -r /tmp/inews.input

This will (-t) trace all I/O with the server and (-r) use a random
message-id each time. If you want to test posting from a newsreading
host (i.e., one that connects to nnrpd and uses the POST command) use
the -p flag.

If inews was able to get to the /usr/lib/news/inn.conf file (for
defaults) you should get a nice post on your screen. If you don't,
here are my suggestions:

1 -- You have an old inews from C news or B news laying around
2 -- inews will give you an error message saying what's wrong.

You might want to look around the usual places to make sure that there
are no old versions of "relaynews" or "inews". People trying to use
the "inews" from C news will get a message about "can't open
redirection" or similar. Make sure they are running the programs
included with INN. There is something called "mini-inews" which should
just take a post and send it to the nntp server. Delete that and
replace it with INN's inews. INN's inews is mini-inews and regular
inews, it is the ying and then yang of inewses. It is the one true
inews. It is the one inews to end all inewses and all others are false
idols.

Note: False idol worshipper and heathen David Myers <dem@meaddata.com>
reports that mini-inews works fine. He stays with mini-inews...
"because INN inews needs to access not only inn.conf, but moderators,
too. Installing and maintaining these files in a ~1000 client,
multiple administrative domain setup like ours is too much of a pain.
Most (all?) of the work done by INN inews is done by in.nnrpd during
posting, anyway."

Kenji Rikitake <kenji@rcac.tdi.co.jp> reports:
"Keep in mind that INN inews refers to many environment variables.
Beware of _inherited_ variables especially when you do su to maintain
your news server.
I got trapped and wasted a day with NNTPSERVER. I tried to post to a
local newsgroup, and inews kept refusing it and sending me 'no such
newsgroups...' error message. I finally found out that inews was
looking up a wrong server, _implicitly_ specified by
'setenv NNTPSERVER ...' in my .login script. It took a day to find
such a subtle misconfiguration, after a whole recompilation of entire
INN kit, active and history rebuilding, and all possible configuration
checking. *sigh*"

"inews -h" sometimes reports: 'Warning, can't connect to server'
What server is it trying to connect to? Remember, inews uses
the NNTPSERVER environmental variable and (if that isn't set) looks
in /usr/lib/news/inn.conf.

INN's inews sometimes prints the error: "Can't get list of newsgroups,
No such file or directory.". inews called CAlistactive() to get a
local copy of the active file. If it can't reach the active file you
get this error. Look at your PATH_TEMPACTIVE and see if it makes
sense; i.e., if it is a valid /tmp directory.

"inews -h" sometimes reports:
	Can't send article to the server:
	441 480 Transfer permission denied
This means that you set HAVE_UNIX_DOMAIN to DONT and you don't have
your news server in its own hosts.nntp file. (nnrpd gets a POST,
connects to innd over a TCP socket and sends an IHAVE.) (thanks to
Chris Jackson <cjj@sun.com> for pointing this out). Add your news
server's name and "localhost" to hosts.nntp and do "ctlinnd reload
hosts.nntp". (For the reason why, read "Warnings to people that must
set HAVE_UNIX_DOMAIN to DONT" in part2)

Chuck Huber <chuck_huber@microbilt.com> adds that this same error
may be caused by setting REM_STYLE to NNTP in config.data, but not
replacing INN's clientlib.o with the reference implementation's version.


"inews -h" sometimes reports:
	Warning Text unavailable -- Article will be spooled.  
This means that inews could not connect to the server, but errno
had nothing useful, and no reply came from the server. "It just
didn't work."

If it still doesn't work, look through your syslog to see the name
of the host that innd got, and why it handed off to nnrpd. Perhaps
there is a DNS/NIS/hosts-file mismatch. (suggested by Rich Salz)

Other problems are usually the result of not being able to find the
"inn.conf" file (copy it to the client or make it available via NFS) or
you are using Sun's brain-dead NIS/DNS stuff which doesn't do reverse
name lookups well. If inews tells you that it can't generate a
Message-ID, ("441 Can't generate Message-ID, Resource temporary unavailable."
or such ) this is because it can't figure out your domain (which is used
in making the message-id string). Inews requires that gethostbyname
returns FQDN and if doesn't then GetFQDN() fails.
Force it to know your domain by adding a "domain:" line in "inn.conf".
Solaris 2.x users will get a "can't generate message-id" error if they
didn't follow the advice about getfqdn.c mentioned in another part of
this FAQ (INN FAQ #2.14).

If you get something like:
	500 "GROUP"" not implemented; try "help".
This implies that the client host is in hosts.nntp, not nnrp.access.
However, if you need to have this machine in the hosts.nntp file
(i.e. it is a feeder or you have an operating system that requires you
to set HAVE_UNIX_DOMAIN to DONT) then your newsreader must send a "mode
reader" to the server when it connects.

Once you get "inews -h -D" working, do the same test without the "-D" option
and let it actually post the message. If it can't post, it will tell
you why. If the answer isn't clear enough, "telnet nntphost 119", give
the "mode reader" command, then the "post" command. Enter lines of
text like you would to "inews -h" and then type "." on a line by itself
(and press RETURN).

If posting via "telnet nntphost 119" DOES work and posting via "inews -h"
DOES NOT work, you know that (1) "inews" is compiled wrong, or more likely,
(2) you aren't using INN's inews. Either way, if this is happening
you know you have narrowed your problems down to the inews program.

By the way, posting to misc.test is pretty useless considering that the
entire world doesn't need to see your message. Post to a local
newsgroup or even a state-wide newsgroup like "nj.test" (assuming you
are in New Jersey). There are lots of people that reply to every test
message they see, so expect to get tons of stupid email. (though, if
you don't get any email consider yourself lucky). Also, there is no
newsgroup called "news.test" so don't post there. Many try, try fail.
By the way, if you are one of those people that reply to every test
message they see, get a real hobby. The convention is that replies
are not sent to test messages with the word "IGNORE" in the Subject:.

Do *NOT* post your test message to a non-test newsgroup. You will get
many angry replies from all over the world. ...including the FAQ maintainer.

Look at the posted message in the news spool (if you post a message to
nj.test, "cd /var/spool/news/nj/test" and cat the highest numbered file
you see). If your site name is listed multiple times in the "Path:"
header, put your server's name on the "pathhost:" line of "inn.conf"
and recompile INN with "INEWS_PATH" set to "DONT". (I don't know why
Rich likes that as the default!)

REMEMBER: inn.conf is read into innd only once. After it is changed,
the innd daemon must be shutdown and restarted. (use "ctlinnd shutdown x"
and then run rc.news as root).

If "inews -h" posts a message, smile because most of the battle is over.

------------------------------

[Source: INN FAQ Part 4 Archive-name: usenet/software/inn-faq/part4]
[Last Changed: $Date: 1997/08/26 01:26:21 $ $Revision: 2.19 $]
[Copyright: 1997 Heiko Rupp, portions by Tom Limoncelli, Rich Salz, et al.]