• INN laxmid - Part II (was: INN laxmid clarification)

    From Jesse Rehmer@jesse.rehmer@blueworldhosting.com to news.software.nntp on Sun Jul 5 14:33:56 2026
    From Newsgroup: news.software.nntp

    On Aug 30, 2025 at 12:26:54rC>PM CDT, "Jesse Rehmer" <jesse.rehmer@blueworldhosting.com> wrote:

    On Aug 30, 2025 at 10:50:12rC>AM CDT, "Julien |eLIE" <iulius@nom-de-mon-site.com.invalid> wrote:

    Hi Jesse,

    Sorry for having forgotten your request. I bet I was waiting for your approval
    of my suggestion of change (innd would accept 0 to 2 '@', but not nnrpd whose
    behaviour would remain unchanged) before starting to work on it.

    I think the following patch will work:

    --- a/lib/messageid.c
    +++ b/lib/messageid.c
    @@ -127,8 +127,8 @@ InitializeMessageIDcclass(void)
    ** When stripspaces is true, whitespace at the beginning and at the end >> ** of MessageID are discarded.
    **
    -** When laxsyntax is true, '@' can occur twice in MessageID, and '..' is >> -** also accepted in the left part of MessageID.
    +** When laxsyntax is true, '@' can occur twice in MessageID, or never occur,
    +** and '..' is also accepted in the left part of MessageID.
    */
    bool
    IsValidMessageID(const char *MessageID, bool stripspaces, bool laxsyntax) >> @@ -155,6 +155,12 @@ IsValidMessageID(const char *MessageID, bool stripspaces,
    bool laxsyntax)
    /* Scan local-part: "<dot-atom-text". */> if (*p++ != '<')>
    return false;
    +
    + /* In case there's no '@' in the Message-ID and laxsyntax is set, just >> + * check the syntax of the Message-ID as though it had no left part. */ >> + if (laxsyntax && strchr((const char *) p, '@') == NULL)
    + return IsValidRightPartMessageID((const char *) p, stripspaces, true);
    +
    for (;; p++) {
    if (midatomchar(*p)) {
    while (midatomchar(*++p))


    --- a/nnrpd/post.c
    +++ b/nnrpd/post.c
    @@ -471,6 +471,10 @@ ProcessHeaders(char *idbuff, bool needmoderation)
    if (!IsValidMessageID(HDR(HDR__MESSAGEID), true, laxmid)) {
    return "Can't parse Message-ID header field body";
    }
    + /* Do not accept a Message-ID without an '@', even if laxmid is set. */ >> + if (laxmid && strchr(HDR(HDR__MESSAGEID), '@') == NULL) {
    + return "Missing @ in Message-ID header field body";
    + }

    /* Set the Path header field. */
    if (HDR(HDR__PATH) == NULL || PERMaccessconf->strippath) {


    If you can confirm it suits your need, and you are now able to inject BNews >> articles downloaded by pullnews, it would be great.

    I'll also add a note in the documentation to warn that when laxmid is set, >> remote peers may reject articles with a syntactically invalid Message-ID.

    This does get past the Message-ID header issue

    Back in 2025 after making these changes I was able to get the articles ingested. Now I have setup a new server that I'm feeding the same articles to, but they are being rejected.

    I'm building with the inn-CURRENT-20260703 snapshot, and see the code changes mentioned in the original thread are present, but when feeding articles to the new server I get bad_messageid errors.

    I do not recall making other code changes besides the two in the quoted text above and setting this in inn.conf:
    syntaxchecks: [ laxmid ]

    I'm at a loss why the following are rejected, any ideas?

    Jul 5 08:53:46 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..362>
    Jul 5 08:53:53 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..182>
    Jul 5 08:53:56 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..91>
    Jul 5 08:53:56 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..95>
    Jul 5 08:53:56 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..92>
    Jul 5 08:53:56 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..96>
    Jul 5 08:53:56 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..99>
    Jul 5 08:53:56 archive innd: [ID 525426 news.warning] 192.168.1.110:22 bad_messageid <bnews..102>
    Jul 5 08:58:01 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <[OFFICE-3]GVT-RICH-408G1>
    Jul 5 09:03:16 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <[OFFICE-3]GVT-RICH-476C0>
    Jul 5 09:03:19 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <[OFFICE-3]GVT-RICH-490UQ>
    Jul 5 09:04:04 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <649@@drux2.UUCP>
    Jul 5 09:04:04 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <650@@drux2.UUCP>
    Jul 5 09:04:04 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <675@@teltone.UUCP>
    Jul 5 09:04:06 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <132@.UUCP>
    Jul 5 09:04:06 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <110@.UUCP>
    Jul 5 09:04:12 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <50)@cunker.UUCP>
    Jul 5 09:06:08 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <507@wjvax(UUCP>
    Jul 5 09:06:25 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <141@.UUCP>
    Jul 5 09:06:35 archive innd: [ID 525426 news.warning] 192.168.1.110:30 bad_messageid <366@mimir..dmt.oz>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Jesse Rehmer@jesse.rehmer@blueworldhosting.com to news.software.nntp on Sun Jul 5 16:01:20 2026
    From Newsgroup: news.software.nntp

    On Jul 5, 2026 at 9:33:56rC>AM CDT, "Jesse Rehmer" <jesse.rehmer@blueworldhosting.com> wrote:

    On Aug 30, 2025 at 12:26:54rC>PM CDT, "Jesse Rehmer" <jesse.rehmer@blueworldhosting.com> wrote:

    On Aug 30, 2025 at 10:50:12rC>AM CDT, "Julien |eLIE"
    <iulius@nom-de-mon-site.com.invalid> wrote:

    Hi Jesse,

    Sorry for having forgotten your request. I bet I was waiting for your approval
    of my suggestion of change (innd would accept 0 to 2 '@', but not nnrpd whose
    behaviour would remain unchanged) before starting to work on it.

    I think the following patch will work:

    --- a/lib/messageid.c
    +++ b/lib/messageid.c
    @@ -127,8 +127,8 @@ InitializeMessageIDcclass(void)
    ** When stripspaces is true, whitespace at the beginning and at the end >>> ** of MessageID are discarded.
    **
    -** When laxsyntax is true, '@' can occur twice in MessageID, and '..' is >>> -** also accepted in the left part of MessageID.
    +** When laxsyntax is true, '@' can occur twice in MessageID, or never occur,
    +** and '..' is also accepted in the left part of MessageID.
    */
    bool
    IsValidMessageID(const char *MessageID, bool stripspaces, bool laxsyntax) >>> @@ -155,6 +155,12 @@ IsValidMessageID(const char *MessageID, bool stripspaces,
    bool laxsyntax)
    /* Scan local-part: "<dot-atom-text". */> if (*p++ != '<')>
    return false;
    +
    + /* In case there's no '@' in the Message-ID and laxsyntax is set, just >>> + * check the syntax of the Message-ID as though it had no left part. */
    + if (laxsyntax && strchr((const char *) p, '@') == NULL)
    + return IsValidRightPartMessageID((const char *) p, stripspaces, true);
    +
    for (;; p++) {
    if (midatomchar(*p)) {
    while (midatomchar(*++p))


    --- a/nnrpd/post.c
    +++ b/nnrpd/post.c
    @@ -471,6 +471,10 @@ ProcessHeaders(char *idbuff, bool needmoderation)
    if (!IsValidMessageID(HDR(HDR__MESSAGEID), true, laxmid)) {
    return "Can't parse Message-ID header field body";
    }
    + /* Do not accept a Message-ID without an '@', even if laxmid is set. */
    + if (laxmid && strchr(HDR(HDR__MESSAGEID), '@') == NULL) {
    + return "Missing @ in Message-ID header field body";
    + }

    /* Set the Path header field. */
    if (HDR(HDR__PATH) == NULL || PERMaccessconf->strippath) {


    If you can confirm it suits your need, and you are now able to inject BNews >>> articles downloaded by pullnews, it would be great.

    I'll also add a note in the documentation to warn that when laxmid is set, >>> remote peers may reject articles with a syntactically invalid Message-ID. >>
    This does get past the Message-ID header issue

    Back in 2025 after making these changes I was able to get the articles ingested. Now I have setup a new server that I'm feeding the same articles to,
    but they are being rejected.

    I'm building with the inn-CURRENT-20260703 snapshot, and see the code changes mentioned in the original thread are present, but when feeding articles to the
    new server I get bad_messageid errors.

    I do not recall making other code changes besides the two in the quoted text above and setting this in inn.conf:
    syntaxchecks: [ laxmid ]

    I'm at a loss why the following are rejected, any ideas?

    I found the issue, later in the thread Julien suggested a different code
    block. I may not have replied to that portion of the thread to confirm, but it is the code that gives the desired outcome in my case.

    From <10910cj$12r8f$1@news.trigofacile.com>:

    Here is a new proposal of patch (do not keep the 4 lines from the
    previous patch which was specifically looking for '@'):

    --- a/lib/messageid.c
    +++ b/lib/messageid.c
    @@ -155,6 +155,21 @@ IsValidMessageID(const char *MessageID, bool
    stripspaces, bool laxsyntax)
    /* Scan local-part: "< dot-atom-text". */
    if (*p++ != '<')
    return false;
    +
    + if (laxsyntax) {
    + for (;; p++) {
    + if (!midnormchar(*p) && *p != '[' && *p != ']')
    + break;
    + }
    + if (*p++ != '>')
    + return false;
    + if (stripspaces) {
    + for (; ISWHITE(*p); p++)
    + ;
    + }
    + return (*p == '\0');
    + }
    +
    for (;; p++) {
    if (midatomchar(*p)) {
    while (midatomchar(*++p))
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Julien_=C3=89LIE?=@iulius@nom-de-mon-site.com.invalid to news.software.nntp on Mon Jul 13 13:33:34 2026
    From Newsgroup: news.software.nntp

    Hi Jesse,

    syntaxchecks: [ laxmid ]

    I found the issue, later in the thread Julien suggested a different code block. I may not have replied to that portion of the thread to confirm, but it
    is the code that gives the desired outcome in my case.

    Yes, indeed the second patch basically accepts every Message-ID as long
    as it has less than 250 bytes, is surrounded by brackets, and does not
    contain invalid characters (like non-printable ones).
    I guess I should just change the current laxmid check to this simple
    check. It will definitely solve the issue for people wanting to accept invalid Message-IDs. (Otherwise, there will always be one more case to handle.)

    Thanks for having reopened the discussion!
    --
    Julien |eLIE

    -2-arCo Par Thor-a!
    rCo Par Odin-a!
    rCo Par exemple-a!-a-+ (Ast|-rix)

    --- Synchronet 3.22a-Linux NewsLink 1.2