doc/hook-perl - response codes for authentication

Alexander Bartolich alexander.bartolich at gmx.at
Thu Dec 25 23:21:13 UTC 2008


The following paragraph in doc/hook-perl

     The NNTP response code should probably be either 281 (authentication
     successful) or 502 (authentication unsuccessful).  If the code returned
     is anything other than 281, nnrpd will print an authentication error
     message and drop the connection and exit.

conflicts with RFC 4643:

    Responses
      281 Authentication accepted
      381 Password required [1]
      481 Authentication failed/rejected
      482 Authentication commands issued out of sequence
      502 Command unavailable [2]

      [2] If authentication has already occurred, AUTHINFO USER/PASS are
          not valid commands (see Section 2.2).

So according to the specification code 481 should be returned instead of 502.
However, my custom Perl hook has returned 502 for two years and that also
seems to carry the message across.

Anyway, the reason I'm reading the RFC is because I search for an appropriate
way to distinguish internal errors (e.g. "Can't connect to MY-SQL") from
authentication errors. Any suggestions?

Ciao

     Alexander.







More information about the inn-workers mailing list