Article View: news.software.nntp
Article #8491Re: Software for newsgroup Moderating... ?
From: David Stoner
Date: Wed, 12 Jun 1996 00:00
Date: Wed, 12 Jun 1996 00:00
98 lines
3428 bytes
3428 bytes
Philippe Khalife (jupiter@resudox.net) wrote:
: I've set a couple of news servers but never had to do any
: newgroup moderation. I'm looking for some software ( Unix && Windows )
: being either an email or news reader that allows to add the Approved:
: line in the header of a message, thus making it possible to moderate a
: newsgroup.
: I've read both ( the relevant parts )
: RFC 1036 : Standard for Interchange of USENET Messages
: How to construct the Mailpaths file ( moderators file for INND ) FAQ
: and neither of these can help.
: I appreciate your help
: Philippe Khalife
: P.S. Cc me if you post to the newsgroup :)
For some reason it's hard to find out anything about this. You'd think
there would be something in a FAQ file somewhere.
Here's an arrangement I've tinkered together. Suppose the official
moderator for a newsgroup has a published e-mail address
group-mod@atlantis.utmb.edu. Then the moderator can receive mail
at that address and, using an ordinary mail user agent such as
mailx or Pine, edit it and forward it to another account called,
for example, group-post@atlantis.utmb.edu, which is set up as
follows:
The .forward file for account group-post looks like this:
"| /bin/sh /usr4/group-post/bing "
This causes sendmail to route incoming mail to a script called bing,
which might look something like this:
#!/bin/sh
nawk '
BEGIN {
subj = "Subject: none"
from = "From: anonymous"
group = "Newsgroups: utmb.misc.test.moderated"
approved = "Approved: group-mod@atlantis.utmb.edu"
body = 0
}
$1 == "Subject:" { subj = $0 }
$1 == "From:" { from = $0 }
$0 == "" {
print from
print subj
print group
print approved
print
while ( getline )
print $0
body = 1
exit
}
END {
if ( ! body )
{
print from
print subj
print group
print approved
print
}
}
' | /usr4/news/inews -h -R
Here, inews is the inews utility distributed with INN, and probably
available independently. Shell environment variables may need to be
set up so that inews knows what server to connect to in order to post
an article.
The above script is barely adequate. You'd probably want to beef
it up to reject mail from anyone other than the moderator, preserve
more headers, etc. You could enlarge the awk program to perform
robo-moderation if you like. In other words, this is just a
skeleton you can elaborate on in any way you wish.
Note that the moderator, group-post, and the news server can be all
on the same machine or on three different machines. I don't think
the server has to be INN; since inews connects and talks to it using
NNTP, it can be any server that observes protocol.
Hope this helps.
-David
Technical Details
Message-ID:
<4pl2fo$8mv@atlantis.utmb.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<31BB948C.100E@resudox.net>Show Full Headers
Complete Article Headers
Message-ID: <4pl2fo$8mv@atlantis.utmb.edu> Subject: Re: Software for newsgroup Moderating... ? Date: Wed, 12 Jun 1996 00:00:00 +0000 From: dstoner@marlin.utmb.edu (David Stoner) References: <31BB948C.100E@resudox.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 159694836 Distribution: inet Followup-to: news.software.nntp,news.software.readers Organization: OAC Newsgroups: news.software.nntp,news.software.readers