We found that some articles posted in vBulletin were not showing up in the NNTP newsgroups, and the following error was logged:
Posting Message 'Re: blah blah blah' from testuser. Result: 441 (615) Article Rejected -- Duplicate Message-ID <testuser.25r4mk@ultrasoft.com> (GLE=0)
This error is caused by the following code in
sendnews in
functions_nntp.php:
Code:
$msgid = $u . '.' . base_convert ($msgid_date, 10, 36) . '@'.$nntp_settings['email'];
$msgid_date++;
Note that
$msgid_date is a local variable, initialized from the global
$nntp['msgid_date']. The next time this function is called, it uses the same value of
$nntp['msgid_date'].
Consequently, if the same user posts twice (or more) all their messages get the same Message-ID.
The fix is simple. Use the global variable instead, as follows:
Code:
$msgid = $u . '.' . base_convert ($nntp['msgid_date'], 10, 36) . '@'.$nntp_settings['email'];
$nntp['msgid_date']++;
You can also get rid of the earlier initialization of the
$msgid_date local variable, as it's no longer needed.
While we don't use moderation, a similar bug would seem to be the cause of the problem
Deepdog009 reported with moderated posts getting left behind when non-moderated posts are replicated (causing the last_postid to get incremented).
Again in function
sendnews in
functions_nntp.php, the $good_to_set_postid variable is local in scope. When a moderated post is replicated, the local variable is set to zero (false), rather than the
$nntp['good_to_set_postid'] global variable.
Having done these fixes, I found an additional problem whereby replies to the posts that had failed to replicate were themselves being rejected (because their parent posts were missing in NNTP).
I worked around this by setting the
last_postid value in the NNTP Gateway Settings page to zero, then re-running the gateway. It won't duplicate posts because those already sent to NNTP are flagged in the database.
Regards,
David