[Mailman-Users] news gateway "GROUP" not implemented

Jim Tittsler jwt at dskk.co.jp
Tue Oct 12 03:15:45 CEST 1999


On Sun, Oct 10, 1999 at 06:23:41PM -0700, Michael Ghens wrote:
> Tried a  news gateway test. This is the error:
[...]
> nntplib.error_perm: 500 "GROUP" not implemented; try "help".

Were you running the mailman gateway on the same machine as the news server?
(Or on another machine that is an NNTP peer of the news server?)

Python's standard nntplib assumes that when it connects it will default to
(NNRP) reader mode.  If the connection ends up in NNTP/news feed mode, many
commands, including "GROUP" will not be recognized.

A quick hack is to add this to your nntplib.py:

diff -u nntplib.py.dist nntplib.py
--- nntplib.py.dist     Tue Apr 28 17:43:35 1998
+++ nntplib.py  Tue Jun 23 22:06:00 1998  
@@ -71,6 +71,10 @@
                self.file = self.sock.makefile('rb')
                self.debugging = 0
                self.welcome = self.getresp()
+               try:
+                   self.welcome = self.shortcmd('mode reader')
+               except:
+                   pass
                if user:
                    resp = self.shortcmd('authinfo user '+user)
                    if resp[:3] == '381':

This makes nntplib use 'mode reader' for all connections.  As Harald Meland
pointed out, this should probably be controlled by adding another optional
argument to nntplib.NNTP(), but if you only use the library with mailman or
in other "client" applications this will suffice.

Jim

P.S. You could also do the 'mode reader' stanza in GatewayManager, but then
you also need to repeat the 'authinfo' code there if your news server needs
authentication, since that must follow the 'mode reader' command.

-- 
Jim Tittsler, Tokyo





More information about the Mailman-Users mailing list