Article View: news.software.nntp
Article #92898Re: INN laxmid - Part II
From: Jesse Rehmer
Date: Sun, 05 Jul 2026 16:01
Date: Sun, 05 Jul 2026 16:01
116 lines
5658 bytes
5658 bytes
On Jul 5, 2026 at 9:33:56 AM CDT, "Jesse Rehmer"
<jesse.rehmer@blueworldhosting.com> wrote:
> On Aug 30, 2025 at 12:26:54 PM CDT, "Jesse Rehmer"
> <jesse.rehmer@blueworldhosting.com> wrote:
>
>> On Aug 30, 2025 at 10:50:12 AM CDT, "Julien ÉLIE"
>> <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))
Technical Details
Message-ID:
<112dv4g$bbt$1@omnios-inn.blueworldhosting.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!.POSTED.192.168.1.112!not-for-mailReferences:
<u90srm$2mhb$1@nnrp.usenet.blueworldhosting.com> <108v6jk$vqr6$1@news.trigofacile.com> <108vc8u$nji$1@nnrp.usenet.blueworldhosting.com> <112dq0k$2615$1@nnrp.usenet.blueworldhosting.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!.POSTED.192.168.1.112!not-for-mail From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com> Newsgroups: news.software.nntp Subject: Re: INN laxmid - Part II Date: Sun, 5 Jul 2026 16:01:20 -0000 (UTC) Organization: BWH Usenet Archive Message-ID: <112dv4g$bbt$1@omnios-inn.blueworldhosting.com> References: <u90srm$2mhb$1@nnrp.usenet.blueworldhosting.com> <108v6jk$vqr6$1@news.trigofacile.com> <108vc8u$nji$1@nnrp.usenet.blueworldhosting.com> <112dq0k$2615$1@nnrp.usenet.blueworldhosting.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 5 Jul 2026 16:01:20 -0000 (UTC) Injection-Info: omnios-inn.blueworldhosting.com; posting-host="192.168.1.112"; logging-data="11645"; mail-complaints-to="usenet@omnios-inn.blueworldhosting.com" User-Agent: Usenapp for MacOS X-Usenapp: v1.28/d - Full License