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
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,This does get past the Message-ID header issue
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. >>
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?
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.
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.
syntaxchecks: [ laxmid ]
bad_messageid <bnews..362>
bad_messageid <[OFFICE-3]GVT-RICH-408G1>
bad_messageid <649@@drux2.UUCP>
bad_messageid <132@.UUCP>
bad_messageid <50)@cunker.UUCP>
bad_messageid <507@wjvax(UUCP>
bad_messageid <366@mimir..dmt.oz>
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 60:01:11 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
4 files (9,632K bytes) |
| Messages: | 286,017 |