Syntax of NNTP commands

Julien ÉLIE julien at
Sat Aug 23 09:45:42 UTC 2008


Are whitespaces allowed at the beginning and the end of NNTP commands?
That is to say, are these commands valid:

    " QUIT"
    "QUIT "
    "LIST MOTD "

It appears that nnrpd accepts them.
However, innd does not accept spaces at the beginning.

According to RFC 3977, I think that both leading and trailing spaces
are not allowed:

    command-line = command EOL
    command = X-command
    X-command = keyword *(WS token)

    command =/ quit-command /

    quit-command = "QUIT"

Should it be enforced in both nnrpd and innd?

By the way, innd only matches the beginning of the command:

% telnet localhost 119
200 InterNetNews server INN 2.5.0 (20080629 prerelease) ready
205 .
Connection closed by foreign host.


Another thing:  "HELP test" should answer "501 Usage error" (nothing should be
put after "HELP").  Should it be fixed?

Julien ÉLIE

« Redde Caesari quae sunt Caesaris, et quae sunt Dei Deo. »
  (saint Matthieu) 

More information about the inn-workers mailing list