problem with perl access feature in readers.conf

Jeffrey M. Vinocur jeff at
Wed Nov 19 19:28:18 UTC 2003

On Wed, 19 Nov 2003, Gael Lams wrote:

> While I've quite a good idea on how to modify the
> file to accomodate it to my "flat-file
> database", I find it difficult to understand the
> perl_access explanation in perl-hook document.

Is there any particular part you find difficult?  We'd like to clarify for 
future users.

> As I have in my text file a list of the newsgroups to
> which the user has access, I thought that one of the
> parameter that would be in the global hash %attribute
> would be the newsgroup's name to which the user is
> asking the connection (I would then have had to
> compare the name of the newsgroup to the list of
> newsgroup to which my user has access).

Nope, the perl_access mechanism doesn't work this way.  Instead, in
%attributes, you'll find the hostname, username if authenticated, and
other information about the incoming connection.

Your script is called only once per connection, and this happens before 
the user has requested a particular newsgroup.  So the idea you suggest 
above can't work.

Instead, your script returns an access block containing the entire list of
newsgroups that the user should have access to, and nnrpd uses that list
as a reference whenever the user attempts to access a newsgroup.

Jeffrey M. Vinocur
jeff at

More information about the inn-workers mailing list