readers.conf with python_access and python_auth

Julien ÉLIE julien at
Sat Jun 7 14:36:40 UTC 2008

Hi David,

> And what this means?
> Jun  7 16:21:34 dev01 nnrpd[2787]: python access method not defined

It means that the access method is not found in your file.
According to the sample shipped with INN, it should be something like:

class AUTH:
    def access(self, attributes):
        syslog('notice', 'n_a access() invoked: hostname %s, ipaddress %s, interface %s, user %s' % (\
            attributes['hostname'], \
            attributes['ipaddress'], \
            attributes['interface'], \

        if '' == str(attributes['ipaddress']):
            syslog('notice', 'authentication by IP address succeeded')
            return {'read':'*','post':'*'}
            syslog('notice', 'authentication by IP address failed')
            return {'read':'!*','post':'!*'}

from nnrpd import *
myauth = AUTH()

    syslog('notice', "authentication module successfully hooked into nnrpd")
except Exception, errmsg:
    syslog('error', "Cannot obtain nnrpd hook for authentication method: %s" % errmsg[0])

Does this mere sample work on your news server?
(I have not tested.)

Julien ÉLIE

« Quand je raconterai mon odyssée, personne ne me croira ! » (Astérix)

More information about the inn-workers mailing list