Thread View: news.software.nntp
5 messages
5 total messages
Started by Louis LeBlanc
Sun, 27 May 2001 15:26
Where the heck can I find info on (or an alternative to) inews?
Author: Louis LeBlanc
Date: Sun, 27 May 2001 15:26
Date: Sun, 27 May 2001 15:26
14 lines
1620 bytes
1620 bytes
Hey all. I am having trouble posting with inews. For some stupid reason it keeps telling me it can't get the list of newsgroups. my other apps are having NO trouble with this, so I am getting annoyed. Is there any place that documents the inews program or has an alternative to a quick, fast posting only program? Please post to the group or remove the first '-nospam' and change the second 'nospam" to 'ne' to mail me directly. Thanks in advance. Lou
Re: Where the heck can I find info on (or an alternative to) inews?
Author: those who know me have no need o...
Date: Sun, 27 May 2001 16:22
Date: Sun, 27 May 2001 16:22
22 lines
1524 bytes
1524 bytes
<3B111B95.AB92748C@acadia.nospam.mediaone.net> divulged: >Hey all. I am having trouble posting with inews. which inews? on what platform? what have you tried? >For some stupid reason it keeps telling me it can't get the list of >newsgroups. was this always the result? sounds like inews doesn't know your server's name. debug it's operation, using whatever tool(s) are available on your un-named platform, looking for enofile or eaccess failures. >Is there any place that documents the inews program or has an >alternative to a quick, fast posting only program? ``man''? -- okay, have a sig then
Re: Where the heck can I find info on (or an alternative to) inews?
Author: An Unspecified Meowbot
Date: Sun, 27 May 2001 20:11
Date: Sun, 27 May 2001 20:11
149 lines
5464 bytes
5464 bytes
Louis LeBlanc <leblanc-nospam@acadia.nospam.mediaone.net> wrote:
> Hey all. I am having trouble posting with inews. For some stupid
> reason it keeps telling me it can't get the list of newsgroups. my
> other apps are having NO trouble with this, so I am getting annoyed.
You have INN's inews installed without the rest of INN. Lose it and
instead use oner of the mini-inews variants.
> Is there any place that documents the inews program
man inews is supposed to work =)
> or has an alternative to a quick, fast posting only program?
#!/usr/bin/env python
"""inews - send a stream or file to an NNTP server using POST.
The article will be posted to the server specified in the NNTPSERVER
environment variable, or localhost if that is not defined.
If you have a file called .authinfo in your home directory, you can use it
to supply username/password info to the server. The format is just:
# this is a comment
news1.example.com username password
news2.example.com anotherusername anotherpassword
This program was automatically generated by an unspecified meowbot
and dumped into the public domain as part of an ongoing effort to
pollute the public consciousness. Meow.
"""
import os, os.path, sys, string, getopt, socket, nntplib
from cStringIO import StringIO
if sys.version[0:5] < '1.5.2':
sys.stderr.write('%s: Python 1.5.2 or newer required\n' % sys.argv[0])
sys.exit(1)
def usage(errmsg):
sys.stderr.write('%s: %s\nUsage: inews [-?][-D1|2][-N][-S] [article]\n'
% (sys.argv[0], errmsg))
def showhelp():
print sys.argv[0], """options:
-?: display this message.
-S: Don't append $HOME/.signature to the article.
-D, -D1: show some Debug information.
-D2: show lots of Debug information.
-N No posting, just display for testing.
"""
def getauth(servername):
authfile = os.path.join(os.getenv('HOME'), ".authinfo")
authuser = ""
authpass = ""
try:
F = open(authfile)
except:
# try to plug along without authinfo
return (authuser, authpass)
for line in F.readlines():
fields = string.split(string.strip(line))
if fields[0][:1] == "#":
continue
if string.lower(fields[0]) == string.lower(servername):
if len(fields) > 1:
authuser = fields[1]
if len(fields) > 2:
authpass = fields[2]
break
return (authuser, authpass)
try:
NNTPSERVER = os.environ['NNTPSERVER']
except KeyError:
NNTPSERVER = 'localhost'
debug = nopost = verbose = 0
signature = 1
try:
optlist, args = getopt.getopt(sys.argv[1:], '?D:NShv')
except:
usage(sys.exc_info()[1])
sys.exit(1)
for (o, v) in optlist:
if o == '-D':
if v in ('1', '2'):
debug = v
else:
usage('Invalid debug level: '+ repr(v))
sys.exit(1)
elif o == '-N':
nopost = 1
elif o == '-S':
signature = 0
elif o == '-h': # for compatibility
pass
elif o == '-?':
showhelp()
sys.exit(0)
if len(args) > 1:
usage('More than one filename supplied')
sys.exit(1)
elif len(args) == 0:
artfile = sys.stdin
else:
try:
artfile = open(args[0], 'r')
except:
sys.stderr.write( "%s: %s: %s\n" % (sys.argv[0], args[0],
sys.exc_info()[1]))
sys.exit(2)
if debug:
print artfile
artout = StringIO()
artout.write(artfile.read())
if signature:
sigfile = os.environ['HOME'] + '/.signature'
try:
sigfh = open(sigfile, 'r')
artout.write("\n-- \n" + sigfh.read())
sigfh.close()
except:
pass
artout.seek(0)
if nopost:
sys.stdout.write(artout.read())
else:
(authuser, authpass) = getauth(NNTPSERVER)
remote = nntplib.NNTP(NNTPSERVER)
remote.set_debuglevel(debug)
try:
remote.shortcmd("mode reader")
except nntplib.error_perm:
pass
if authuser:
resp = remote.shortcmd("authinfo user %s" % authuser)
if resp[0] == "3" and authpass:
remote.shortcmd("authinfo pass %s" % authpass)
remote.post(artout)
Re: Where the heck can I find info on (or an alternative to) inews?
Author: Louis LeBlanc
Date: Sun, 27 May 2001 23:56
Date: Sun, 27 May 2001 23:56
56 lines
3650 bytes
3650 bytes
On 05/27/01 03:26 PM, Louis LeBlanc sat at the puter and typed: > Hey all. I am having trouble posting with inews. For some stupid > reason it keeps telling me it can't get the list of newsgroups. my > other apps are having NO trouble with this, so I am getting annoyed. > > Is there any place that documents the inews program or has an > alternative to a quick, fast posting only program? > > Please post to the group or remove the first '-nospam' and change the > second 'nospam" to 'ne' to mail me directly. > > Thanks in advance. > > Lou Ok, you guys had some questions and suggestions, and I want to thank you for trying to help. I realize I left a lot of info out, and I should know better. Anyway, here is the poop. I am running RH 6.2, and trying to get a patched version of mutt to read and post nntp articles. All was going great with it except that posting is not working. See the message above. As it turns out, 'man inews' is rather unhelpful in that it tells how to use it from the commandline, and does not provide troubleshooting info, nor does it provide a source (URL, etc) of other info. There is an email address for the author, but I am loathe to bother someone directly in these cases, unless I can offer some direct benefit to the project - which I cannot at this time. Maybe that is a dumb hangup, but there it is. Anyway, someone suggested I simply get rid of inn - which I will. I also have the standalone inews package, so that should be fine. As for the actual cause of my problem, it is nothing more complicated than a permissions issue (Duh! says so in the error, doesn't it!). The pathtmp definition in inn.conf pointed to a directory with permissions set to 755, rather than 775. Seems to me a temp directory should be writable by anyone, so I changed it to my /tmp directory and problem solved! This was one I should have never gotten into, but I recently ran out of room in the partition I use for my temp directory, so I started playing some tricks on the system to get around it. Looks like I snookered myself. Thanks again for helping guys! Lou -- Louis LeBlanc Hey, you with the robot! Don't you dare spam me. To mail me for *legitimate* purposes, remove the '-spamproof' and change 'nospam' to 'ne' ΤΏΤ¬
Re: Where the heck can I find info on (or an alternative to) inews?
Author: A Meowbot
Date: Mon, 28 May 2001 04:37
Date: Mon, 28 May 2001 04:37
32 lines
2632 bytes
2632 bytes
Louis LeBlanc <leblanc-spamproof@acadia.nospam.mediaone.net> wrote: > As it turns out, 'man inews' is rather unhelpful in that it tells how > to use it from the commandline, and does not provide troubleshooting > info, nor does it provide a source (URL, etc) of other info. Tht information is in the installation instructions, which Red Hat seem to insist on hiding. > Anyway, someone suggested I simply get rid of inn - which I will. I > also have the standalone inews package, so that should be fine. Well, keep INN if you're actually using it. Only its inews has had a checkered past (though the very latest version is much safer). > As for the actual cause of my problem, it is nothing more complicated > than a permissions issue (Duh! says so in the error, doesn't it!). > The pathtmp definition in inn.conf pointed to a directory with > permissions set to 755, rather than 775. Seems to me a temp directory > should be writable by anyone, so I changed it to my /tmp directory and > problem solved! No, you opened up a security hole. INN's temp directory should not be world writable. If you wish, you can instead set INN's inews to be setgid news, but please read the following advisory first so you know why things were set up the way they were. <URL:http://www.isc.org/products/INN/inn2.2.vulnerability.html> The specific overflow in the advisory has been fixed, but think twice if you have more than yourself as a user on that machine.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads