Invalid 431 response when server is paused

Julien ÉLIE julien at
Sun Jan 1 17:32:30 UTC 2012

Hi River,

And Happy New Year 2012 to all the readers of this mailing-list!

> Jan 01 01:36:18 INFO:     feeder: unit0[2001:470:933e::5]:nntp: expected
> msg-id <4efed3fb$0$30390$a8266bb1 at>  but got 431
> Expiring  process 3697
> The problem seems to be the code for handling a paused server state in
> innd/nc.c:
>      } else if (Mode == OMpaused) {
>          cp->Check_deferred++;
>          xasprintf(&buff, "%d %s", NNTP_FAIL_CHECK_DEFER, ModeReason);

That's a pretty good catch.  Thanks for having reported it.
You're right to say there is an issue here.

I have just checked the other responses for innd in streaming mode, and
I believe it is the only one that has a problem.

Besides, getMsgId() in innfeed/misc.c properly finds the message-ID
as first argument, so that's fine to fix innd here.

> isis# ctlinnd pause 'testing'
> Ok
> harmony% telnet isis 433
> Trying 2a01:348:65::3...
> Connected to isis.RT.UK.EU.ORG.
> Escape character is '^]'.
> 200 InterNetNews server INN 2.5.2 ready (transit mode)
> CHECK<a at b>
> 431 testing

With the patch:

I now see the right behaviour:

CHECK <test at test>
431 <test at test> testing

> This behaviour is clearly wrong: 431 should always have the message-id
> as the first argument, no matter why it was deferred.


The remaining of this mail is more a digression about two edge cases.
Not totally related to the subject of this mail.
Thanks again for it!


Incidentally, does the feeder you are speaking about properly handle
the 400 response code innd gives when paused and TAKETHIS is used?
I do not know if you can easily force TAKETHIS without a previous CHECK.
Anyway, there is no code for asking a feed to defer an article with TAKETHIS;
RFC 4644 mentions that we MUST send 400 here and close the connection so
as not to reject the article.

And, more subtle, does it handle 501 response codes?
(innfeed still does not; however, it normally does not send invalid
message-IDs so it should not receive 501 for an invalid syntax!)
That's why innd still returns 438/439 (for a reject) instead of 501
when running normally (not paused):

CHECK <test>
438 <test>


439 <test>

instead of the *right* answers:

CHECK <test>
501 Syntax error in Message-ID

501 Syntax is:  IHAVE message-ID

501 Syntax error in Message-ID

Have a nice year!

Julien ÉLIE

« Il fallait être Anglais pour inventer le rugby. Qui d'autre aurait
  pu penser à un ballon ovale ? »

More information about the inn-workers mailing list