nnrpd reporting wrong Message-ID
Christoph Biedl
cbiedl at gmx.de
Sat Feb 7 16:36:45 UTC 2004
Summary: When posting an article nnrpd might report and log a wrong
Message-ID. However, the article itself is not affected.
Wenn posting an article, nnrpd suggests a Message-ID and will use this
unless the user supplies one on his own. After the article has been
accepted, nnrpd shows the Message-ID and also logs it to news.notice.
When run in spooling mode for whatever reason, nrrpd _always_ reports his
proposal even if there is a user-supplied one. This might seriously
confuse a news admin who wants to check whether articles posted but
spooled during an innd maintaince really made it the net after an
'rnews -U' since the Message-ID in news.notice cannot be found anywhere
else, neither in the news log file nor in the history.
How to repeat:
Start an nnrpd in spooling mode and post an article with a Message-ID:
| $ nnrpd -o
| 200 testnews.in-ulm.de InterNetNews NNRP server INN 2.4.1 ready (posting ok).
| post
| 340 Ok, recommended ID <c02u1r$o4h$1 at testnews.in-ulm.de>
| From: me at example.com
| Subject: a test
| Newsgroups: in-ulm.test
| Message-ID: <user.supplied at message-id>
|
| foo
| .
| 240 Article posted <c02u1r$o4h$1 at testnews.in-ulm.de>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This should be '<user.supplied at message-id>'
Same error in news.notice:
| Feb 7 15:52:17 testnews nnrpd[24721]: stdin post ok <c02u1r$o4h$1 at testnews.in-ulm.de>
However, the article has _not_ been harmed:
| $ grep 'Message-ID:' ~/spool/incoming/*
| /opt/news/testnews/spool/incoming/SChCbl:Message-ID: <user.supplied at message-id>
| grep: /opt/news/testnews/spool/incoming/bad: Is a directory
Diagnosis:
When nnrpd in running in spooling mode idbuff does not get the proper
information. As far as I can see this problem existed already in INN 1.7
and is still in inn-CURRENT-20040207.
Patch:
The following simple patch applies to 2.4.1.
INN 2.3.x probably needs a re-writing as strcpy is used there instead of
strlcpy.
--- inn-2.4.1.orig/nnrpd/post.c Wed Jan 7 23:47:19 2004
+++ inn-2.4.1/nnrpd/post.c Sat Feb 7 16:35:06 2004
@@ -1086,6 +1086,9 @@
return MailArticle(modgroup, article);
}
+ if (idbuff)
+ strlcpy(idbuff, HDR(HDR__MESSAGEID), SMBUF);
+
if (PERMaccessconf->spoolfirst)
return Spoolit(article, Error);
@@ -1211,8 +1214,6 @@
/* Send a quit and close down */
SendQuit(FromServer, ToServer);
- if (idbuff)
- strlcpy(idbuff, HDR(HDR__MESSAGEID), SMBUF);
/* Tracking */
if (PERMaccessconf->readertrack) {
More information about the inn-workers
mailing list