/errs.[0-9].gz
/stump/data
/stump/tmp
+/webstump/Makefile
/webstump/bin/q
/webstump/bin/wrapper
/webstump/config/*
/xlog/log/*/event.log.[0-9]
/xlog/log/*/event.log.[0-9].gz
/crontab.part
+/stump/etc/modenv
/stump/etc/added-headers
/stump/etc/added-footer
/stump/etc/added-footer.new
/stump/etc/approval.key.txt
+/stump/etc/modack.approved
+/stump/etc/modack.received
+/stump/etc/modack.approved.new
+/stump/etc/modack.received.new
+/stump/etc/moderators
/sballot/issues
+/inews
+/mailinglists_dir.part
+/forward-slimy.part
+/forward-suffix.part
+/cgi/logs
+/README.auto
/settings
/moderators
+/persistent-autosettings
--- /dev/null
+
+The logs are at
+ %CGIBASEURL%/l.%ABBREV%
+
+The submission addresses are
+ %OURUSER%+%ABBREV%+%KEYSUBMIT%@%SLIMYDOMAIN%
+ %OURUSER%+%ABBREV%+test-submission@%SLIMYDOMAIN%
+
--- /dev/null
+#!/bin/bash
+set -e
+cd %BASEDIR%/xlog/log
+exec ../bin/report %GROUP% "$@"
--- /dev/null
+../webstump/bin/wrapper
\ No newline at end of file
# ssh webstump@chiark live/crontab-install
#
#m h d m dow
-50 7 12 * * savelog live-%ABBREV%/xlog/log/%GROUP%/event.log
+50 7 * * 1,4 savelog live-%ABBREV%/xlog/log/%GROUP%/event.log
50 7 12 * * savelog live-%ABBREV%/errs
+++ /dev/null
-if $local_part_suffix is +urcm+nmw7gihi
-or $local_part_suffix is +urcm+test-submission
-then
- unseen pipe "mail -s submission list-webstump+urcm+log+submissions"
- unseen pipe "/home/webstump/live/xlog/bin/record submission uk.rec.cycling.moderated"
- pipe "/home/webstump/live/stump/etc/modenv stump.pl submission.pl"
- finish
-endif
-
--- /dev/null
+if $local_part_suffix is +%ABBREV%+%KEYSUBMIT%
+or $local_part_suffix is +%ABBREV%+test-submission
+then
+ unseen pipe "mail -s submission %LOGGROUPEMAILPREFIX%+%ABBREV%+log+submissions"
+ unseen pipe "/home/webstump/live/xlog/bin/record submission %GROUP%"
+ pipe "/home/webstump/live/stump/etc/modenv stump.pl submission.pl"
+ finish
+endif
+
+++ /dev/null
-if $local_part_suffix is +urcm-bounces
-then
- seen deliver list-webstump+urcm+log+bounces
- finish
-endif
-
-if $local_part_suffix is +urcm-noack
-then
- unseen deliver list-webstump+urcm+log+noack
- pipe "/home/webstump/live/stump/etc/modenv stump.pl processNoack.pl"
- finish
-endif
-
-if $local_part_suffix is +urcm-internal-webstump/4norttu6
-then
- unseen deliver list-webstump+urcm+log+stump2webstump
- unseen pipe "/home/webstump/live/xlog/bin/record stump2webstump uk.rec.cycling.moderated"
- pipe "/home/webstump/live/webstump/scripts/file-message.pl"
- finish
-endif
-
-if $local_part_suffix is +urcm-internal-approve/pzv4uztw
-then
- unseen deliver list-webstump+urcm+log+webstump2stump
- unseen pipe "/home/webstump/live/xlog/bin/record webstump2stump uk.rec.cycling.moderated"
- pipe "/home/webstump/live/stump/etc/modenv stump.pl acceptFromMod.pl"
- seen finish
-endif
-
-if $local_part_suffix is +urcm-internal-log+mailout
-then
- unseen deliver list-webstump+urcm+log+mailout
- pipe "/home/webstump/live/xlog/bin/record mailout uk.rec.cycling.moderated"
- finish
-endif
-
-if $local_part_suffix is +urcm-internal-reject-copy
-then
- seen deliver urcm-rejections@chiark.greenend.org.uk
- finish
-endif
-
-unseen finish
--- /dev/null
+if $local_part_suffix is +%ABBREV%-bounces
+then
+ seen deliver %LOGGROUPEMAILPREFIX%+%ABBREV%+log+bounces
+ finish
+endif
+
+if $local_part_suffix is +%ABBREV%-noack
+then
+ unseen deliver %LOGGROUPEMAILPREFIX%+%ABBREV%+log+noack
+ pipe "%BASEDIR%/stump/etc/modenv stump.pl processNoack.pl"
+ finish
+endif
+
+if $local_part_suffix is +%ABBREV%-internal-webstump/%KEYSTUMP2WEB%
+then
+ unseen deliver %LOGGROUPEMAILPREFIX%+%ABBREV%+log+stump2webstump
+ unseen pipe "%BASEDIR%/xlog/bin/record stump2webstump %GROUP%"
+ pipe "%BASEDIR%/webstump/scripts/file-message.pl"
+ finish
+endif
+
+if $local_part_suffix is +%ABBREV%-internal-approve/%KEYWEB2STUMP%
+then
+ unseen deliver %LOGGROUPEMAILPREFIX%+%ABBREV%+log+webstump2stump
+ unseen pipe "%BASEDIR%/xlog/bin/record webstump2stump %GROUP%"
+ pipe "%BASEDIR%/stump/etc/modenv stump.pl acceptFromMod.pl"
+ seen finish
+endif
+
+if $local_part_suffix is +%ABBREV%-internal-log+mailout
+then
+ unseen deliver %LOGGROUPEMAILPREFIX%+%ABBREV%+log+mailout
+ pipe "%BASEDIR%/xlog/bin/record mailout %GROUP%"
+ finish
+endif
+
+if $local_part_suffix is +%ABBREV%-internal-reject-copy
+then
+ seen deliver %ABBREV%-rejections@chiark.greenend.org.uk
+ finish
+endif
+
+unseen finish
--- /dev/null
+#
+
+paskeys='KEYSUBMIT KEYSTUMP2WEB KEYWEB2STUMP'
+pas="$paskeys"
+for k in $pas; do eval "$k=''"; export $k; done
+
+. settings
+export GROUP ABBREV INFOHEADER MODEMAIL GROUPURL
+
+. ../global-settings
+export ROOTBASEDIR CGIBASEURL DOMAIN SLIMYDOMAIN OURUSER ADMIN
+export LOGGROUPPREFIX LOGGROUPEMAILPREFIX TESTGROUP
+export STATICFILESURL STATICFILESDIR CGISCRIPTDIR
+
+BASEDIR=$ROOTBASEDIR/live-$ABBREV
+export BASEDIR
+
+
+# derivative settings:
+
+test -f persistent-autosettings || touch persistent-autosettings
+. persistent-autosettings
+
+exec 3>persistent-autosettings.new
+cat >&3 persistent-autosettings
+
+for k in $pas; do
+ eval "v=\$$k"
+ if [ "x$v" != x ]; then continue; fi
+
+ v="`dd if=/dev/urandom count=6 ibs=1 2> /dev/null \
+ | uuencode -m - \
+ | perl -ne 'y/A-Z\+\//a-z01/; print if $.==2;' `"
+ case $v in
+ ????????) ;;
+ *) exit 1;;
+ esac
+ case $v in
+ *[^0-9a-z]*) echo >&2 "unexpected from dd etc.: $v"; exit 1 ;;
+ esac
+ echo >&3 "$k='$v'"
+done
+
+mv -f persistent-autosettings.new persistent-autosettings
+
+exec 3>&-
+. persistent-autosettings
+
inews -h -Q -R <$tf
else
(set -e
- echo "Newsgroups: chiark.test.moderated"
+ echo "Newsgroups: %TESTGROUP%"
sed 's/^Newsgroups:/X-Would-Newsgroups:/' $tf) | inews -h
fi
`
if [ $rc = 0 ]
then
echo 'posted ok!'
- $HOME/live/xlog/bin/record posted uk.rec.cycling.moderated <$tf
+ $HOME/live/xlog/bin/record posted %GROUP% <$tf
exit 0
fi
+++ /dev/null
-#!/bin/sh
-set -e
-
-#real=false
-real=true
-
-export NNTPSERVER=nnrp.chiark.greenend.org.uk
-export NNTPAUTH='md5cookie1way chiark'
-
-trap 'rm -f "$tf"' 0
-
-tf=`mktemp`
-
-sed '${ /^$/d }' >$tf
-
-set +e
-output=`
- set -e
- exec 2>&1
- if $real; then
- inews -h -Q -R <$tf
- else
- (set -e
- echo "Newsgroups: chiark.test.moderated"
- sed 's/^Newsgroups:/X-Would-Newsgroups:/' $tf) | inews -h
- fi
-`
-rc=$?
-set -e
-
-if [ $rc = 0 ]
-then
- echo 'posted ok!'
- $HOME/live/xlog/bin/record posted uk.rec.cycling.moderated <$tf
- exit 0
-fi
-
-(
- printf "Errors: %s" "$output"
- echo
- echo ======================
- cat $tf
-) | mail -s 'lost moderated newsgroup submission' webstump
esac
cd $basedir
-for f in crontab forward-suffix forward-slimy
+. global-settings
+
+if [ x"`whoami`" != x"$OURUSER" ]; then
+ echo >&2 "$0 must be run as $OURUSER, skipping"
+ exit 0
+fi
+
+fall-over-now
+
+for f in crontab forward-suffix forward-slimy mailinglists_dir
do
d=$f
g=$f.combined
--- /dev/null
+#!/bin/bash
+set -e
+
+. settings
+. ../global-settings
+. persistent-autosettings
+
+mkdir -p webstump/queues/$GROUP
+mkdir -p xlog/log/$GROUP
+
+ngdir=webstump/config/newsgroups/$GROUP
+mkdir -p $ngdir
+cp webstump/skeleton/*.IN[1O] $ngdir/.
+
+exec <moderators
+
+mods=$ngdir/moderators
+exec 3>$mods.new
+
+test -f $mods || touch $mods
+
+while read name email; do
+ set +e
+ grep "^$name " $mods >$mods.tmp
+ rc=$?
+ set -e
+ case $rc in
+ 0) ;;
+ 1)
+ pass=`perl -e </dev/urandom '
+ select(STDIN); $|=1; select(STDOUT);
+ for $x (0..7) {
+ read(STDIN,$bin,4) == 4 or die $!;
+ $v= unpack "l",$bin;
+ $v %= 36;
+ printf "%c", $v<10
+ ? $v+ord("0")
+ : $v-10+ord("A");
+ }
+ print "\n";
+ '`
+ echo "$name $pass" >$mods.tmp
+
+ mail -s "your $ABBREV moderator password" <<END "$email"
+The moderation interface for $GROUP is here:
+ $CGIBASEURL/g.$ABBREV/webstump?action=login_screen&newsgroup=$GROUP
+
+Your username and password for the moderation interface are:
+ $name
+ $pass
+These are _not_ case sensitive (!)
+
+Please see other emails for further information.
+
+Regards,
+moderation system administrator
+END
+ ;;
+ *)
+ echo >&2 "huh $rc ?"; exit 1
+ ;;
+ esac
+ cat $mods.tmp >&3
+ rm $mods.tmp
+done
+
+exec <$mods
+while read name pass; do
+ set +e
+ grep "^$name " $mods.new >$mods.tmp
+ rc=$?
+ set -e
+ case $rc in
+ 0) ;;
+ 1)
+ echo "*** Preserving obsolete moderator $name"
+ cat $mods.tmp >&3
+ ;;
+ *)
+ echo >&2 "huh2 $rc ?"; exit 1
+ ;;
+ esac
+ rm $mods.tmp
+done
+
+mv -f $mods.new $mods
#!/bin/bash
set -e
-. settings
-export GROUP
-export ABBREV
-export INFOHEADER
-find -name '*.IN[O1]' -exec perl -e '
+
+. ./get-settings
+
+find -name '*.IN[O1]' ! -path '*/skeleton/*' -exec perl -e '
use IO::Handle;
use POSIX;
my $f= shift;
my $g= "$d.new";
open F, "< $f" or die "$f $!";
open G, "> $g" or die "$g $!";
+ stat F or die "$f $!";
+ my $mode= (stat F)[2];
while (<F>) {
s/\%(\w+)\%/
exists($ENV{$1}) ? $ENV{$1} : die "$1 ?"
print G or die $!;
}
F->error and die $!;
- close F or die $!;
close G or die $!;
+ if ($mode & 01) {
+ chmod 0755, $g or die "$g $!";
+ }
+ close F or die $!;
if ($overwrite) {
rename $g, $d or die "$g $d $!";
} else {
--- /dev/null
+#!/bin/bash
+set -e
+
+. ./get-settings
+
+install_link () {
+ rm -f $2.new
+ ln -s $1 $2.new
+ mv -f -T $2.new $2
+}
+
+install_link $BASEDIR/cgi $CGISCRIPTDIR/g.$ABBREV
+install_link $BASEDIR/cgi/logs $CGISCRIPTDIR/l.$ABBREV
+install_link $BASEDIR/public-html $STATICFILESDIR/g.$ABBREV
+
--- /dev/null
+%OURUSER%+%ABBREV%+log+submissions: %LOGGROUPPREFIX%.%ABBREV%.submissions
+%OURUSER%+%ABBREV%+log+stump2webstump: %LOGGROUPPREFIX%.%ABBREV%.stump2webstump
+%OURUSER%+%ABBREV%+log+webstump2stump: %LOGGROUPPREFIX%.%ABBREV%.webstump2stump
+%OURUSER%+%ABBREV%+log+mailout: %LOGGROUPPREFIX%.%ABBREV%.mailout
+%OURUSER%+%ABBREV%+log+bounces: %LOGGROUPPREFIX%.%ABBREV%.bounces
+%OURUSER%+%ABBREV%+log+noack: %LOGGROUPPREFIX%.%ABBREV%.noack
--- /dev/null
+../webstump/images
\ No newline at end of file
#
# Some things are idempotent, others are once-only.
-./install-key
-./install-substitutions
-./install-aggregates
+x () {
+ echo "==== $* ===="
+ "$@"
+}
+
+x ./install-key
+x ./install-newsgroup
+x ./install-substitutions
+x make -C webstump
+x ./install-aggregates
+
+echo ==== DONE ====
+
+x cat README.auto
--- /dev/null
+#!/bin/sh
+#
+# This script checks whether the article conforms to the charter.
+# It accepts the article from stdin.
+#
+# should be individual for every newsgroup
+#
+
+if isbinary ; then
+ exit 1 # does NOT conform
+fi
+
+exit 0 # conforms
--- /dev/null
+# This is a crontab file for your newsgroup. Crontab is a Unix table that
+# specifies when and which programs should be run at regular intervals.
+#
+# If you do not know what is cron and crontab, do not bother editing this
+# file. It is not needed to provide the core functionality for your
+# newsgroup.
+#
+# Its primary use is for regular cleanups, posting monthly summaries
+# of approved and rejected messages, and so on. You can set it up
+# later when the core of the STUMP functionality is working.
+#
+
+# Every sunday at midnight, create and compress an archive of approved
+# and rejected postings. Saves disk space.
+#
+0 0 * * sun $HOME/stump/etc/modenv createArchive < /dev/null
+
+# every night send me the report about the number of articles
+# actually posted to the newsgroup. PLease replace "ichudov" with
+# your own email address, e.g. johndoe@yoursite.com
+#
+0 0 * * * $HOME/stump/etc/posted_log ichudov < /dev/null > /dev/null 2>/dev/null
+
+# Every month on the 5th, post a neat summary of approved rejected
+# articles.
+#
+5 0 1 * * $HOME/stump/etc/modenv report.sh
+
+#
+# resubmit failed articles
+#
+10 * * * * $HOME/stump/etc/modenv submitFailed 2>/dev/null
+
--- /dev/null
+moderators etc/moderators1 File with the list of current active/inactive moderators
+bad.guys.list data/bad.guys.list1 Blacklist -- file with posters who are not allowed to post.
+tmp tmp TEST: Temp directory...
--- /dev/null
+#!/bin/sh
+
+(
+ cat $@ | formail -rt -I "Reply-To: $NOACK" \
+ -I "X-Webstump-Event: approve" \
+ -I 'Bcc: %OURUSER%+%ABBREV%-internal-log+mailout'
+ cat <<_EOB_
+Hello,
+
+$EXPLANATION
+
+This is an automatic notification that your message has been APPROVED
+for posting to moderated newsgroup $NEWSGROUP.
+
+For details of the moderation arrangements see
+ %GROUPURL%
+
+If you do not want to receive automatic acknowledgments in the future,
+simply reply to this message, QUOTING ITS TEXT IN FULL.
+
+_EOB_
+
+ sed 's/^/> /; s/%OURUSER%+[-+/0-9a-z]*@%DOMAIN%/%OURUSER%+?@%DOMAIN%/' \
+ $@
+) | sendmail -t -f $MUNGED_ADDRESS
--- /dev/null
+#!/bin/sh
+
+TMPFILE=$TMP/reply.$$
+
+cat > $TMPFILE
+
+(
+ formail -rt -I "Reply-To: $NOACK" \
+ -I "X-Webstump-Event: ack" \
+ -I 'Bcc: %OURUSER%+%ABBREV%-internal-log+mailout' \
+ < $TMPFILE
+ cat <<_EOB_
+Hello,
+
+This is an automatic acknowledgement that your message has been RECEIVED
+by the robomoderation program for newsgroup $NEWSGROUP.
+
+This message has been queued and will be reviewed by the moderators
+as necessary, and you will receive another email when a decision
+about your article has been made.
+
+If you do not want to receive automatic acknowledgments in the future,
+simply reply to this message, QUOTING ITS TEXT IN FULL.
+
+For details of the moderation arrangements see
+ %GROUPURL%
+
+_EOB_
+
+ sed 's/^/> /; s/%OURUSER%+[-+/0-9a-z]*@%DOMAIN%/%OURUSER%+?@%DOMAIN%/' \
+ < $TMPFILE
+) | sendmail -t -f $MUNGED_ADDRESS
+
+rm $TMPFILE
--- /dev/null
+#!/bin/bash
+#
+# MAIN CONFIGURATION FILE
+#
+# ### Administrators of STUMP robomoderator systems:
+#
+# set environment variables according to config of your site.
+# this script is normally invoked from procmail, as a wrapper
+# to real moderation scripts. Follow the instructions.
+#
+
+#######################################################################
+# this is the root directory where moderation software & config
+# resides. Make sure that sendmail is in the PATH.
+# (most likely it is in /usr/lib/sendmail).
+#
+
+MNG_ROOT=%BASEDIR%/stump
+exec >>%BASEDIR%/errs 2>&1
+
+export MNG_ROOT BASEDIR
+
+# Add bin and local/bin to PATH
+PATH=$MNG_ROOT/bin:$MNG_ROOT/local/bin:$MNG_ROOT/etc:$PATH:/usr/sbin
+PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/usr/sbin:$HOME/bin
+export PATH
+
+#######################################################################
+# Name of moderated group. Put the name of your group in here.
+#
+
+NEWSGROUP="%GROUP%"; export NEWSGROUP
+
+#######################################################################
+# STUMP enforces limitations on the maximum number of newsgroups
+# used in Newsgroups: header line. The default value is 5. I
+# You can change this value. If you do not want to enforce limitations
+# on crossposting, set MAX_CROSSPOSTS to 1000.
+#
+MAX_CROSSPOSTS=1
+export MAX_CROSSPOSTS
+
+
+######################################################################
+# Do you really want to use PGP? PGP (Pretty Good Privacy) is a
+# program that allows you (among other things) digitally sign messages
+# and check digital signatures.
+#
+# It can make certain transactions more non-repudiable and secure.
+# however, for most newsgroups the benefits of security are not as
+# important and many users prefer not to use PGP.
+#
+# Those users may set PGP to "none" (lowercase).
+#
+# This ENTIRELY DISABLES use of PGP. That also disables PGPMoose, a
+# program that relies on PGP to digitally sign all approvals.
+# PGP Moose can help you combat forged approvals.
+#
+# My suggestion is, if you are not comfortable with PGP and have other
+# things on your plate, set PGP to "none" and set it up later when
+# time permits. Get other stuff working first.
+#
+# Alternatively, you could set PGP to the path to the actual PGP executable,
+# as in:
+#
+# PGP=/usr/local/bin/pgp262
+#
+# Note that STUMP _requires_ pgp v. 2.6.2.
+#
+
+PGP="gpg"
+export PGP
+
+######################################################################
+# for pmapp - digital signing
+
+######################################################################
+# PGP key names.
+# PMUSER must be exactly as the PGP key named in the keyring
+# Refer to the online documentation on how to create PGP keys.
+#
+# *IF* you do not plan to use PGP at all, define it like this:
+# PMUSER_APPROVAL="SCRM Moderators <scrm-board@algebra.com>"
+# and make sure that PMAPP is defined as "cat".
+#
+# this MUST be dfined EVEN if PGP is set to "none".
+# This goes into your Approved: field.
+PMUSER_APPROVAL="%GROUP% approval key <urcm-moderators@chiark.greenend.org.uk>"
+export PMUSER_APPROVAL
+
+######################################################################
+# type in the passphrase for PGP Moose (passphrase for the Approval Key
+# named right above that you generated)
+# ONLY if pgp moose is used
+#
+# (in turn, PGP Moose is used only if PGP is NOT set to "none")
+#
+PMPASSWORD=""
+export PMPASSWORD
+
+######################################################################
+#
+# PMAPP is the name of the PGP Moose signing program. If you do not
+# want to use it, define PMAPP as "cat", like this:
+# PMAPP="cat"; export PMAPP
+#
+# otherwise, use "pmapp":
+# PMAPP="pmapp"; export PMAPP
+#
+# NOTE!!! PMApp is disabled if PGP is set to "none"!
+#
+
+PMAPP="pmapp"; export PMAPP
+
+######################################################################
+#
+# DECISION_ADDRESS is the address for approved AND rejected submissions
+# Used by ModScape subsystem only.
+#
+#DECISION_ADDRESS=scrm-approved@algebra.com
+#export DECISION_ADDRESS
+
+######################################################################
+# put a munged address for your group here. It should best resolve to
+# a devnulled address, since a lot of rejections/acks will bounce
+# and there is no need for a human being to see the bounces.
+#
+MUNGED_ADDRESS=%OURUSER%+urcm-bounces@%DOMAIN%
+export MUNGED_ADDRESS
+
+
+######################################################################
+# Where to submit ready and signed articles
+# You do not need this if you set RNEWS (below) to sendmail, as
+# instructed.
+#IHAVE_SERVER=news.uu.net; export IHAVE_SERVER
+
+######################################################################
+# Path: suffix for news
+# Put something similar here, it is not a very important value.
+#
+PATH_SUFFIX="%GROUP%-moderators!robomod!not-for-mail"; export PATH_SUFFIX
+
+######################################################################
+# Do we want to work in paranoid PGP mode? YES or NO
+#
+# NOTE: it means more work for the maintainer
+#
+# I suggest STRONGLY that you should set it to NO!!!!!!!!!!
+#
+# This is disabled If PGP is set to "none".
+#
+STUMP_PARANOID_PGP=NO
+export STUMP_PARANOID_PGP
+
+######################################################################
+# reachable email address of a real person who is responsible
+# for maintaining the robomoderator.
+#
+ADMIN=%ADMIN%; export ADMIN
+
+######################################################################
+# Address of the moderator's board (little private mailing list
+# for moderators only) where posters can send their complaints about the
+# moderation policy.
+#
+BOARD=%MODEMAIL%; export BOARD
+
+######################################################################
+# address for the no-ack requests.
+NOACK=%OURUSER%+urcm-noack@chiark.greenend.org.uk
+export NOACK
+
+######################################################################
+# Official address for submissions to the newsgroup.
+#
+SUBMIT=%OURUSER%+urcm+%KEYSUBMIT%@chiark.greenend.org.uk; export SUBMIT
+
+###################################################################### Flags
+#
+# ATTENTION!!! Flags must be YES or NO, in capital letters.
+#
+
+######################################################################
+# set this flag to YES if you want to REQUIRE all preapproved
+# posters to use PGP to sign their messages. Typically you
+# do not want to do it, unless your group has
+# been SEVERELY invaded by malicious forgers.
+#
+# disabled if PGP is set to "none"
+#
+WHITELIST_MUST_SIGN=NO; export WHITELIST_MUST_SIGN
+
+########################################################## where is your rnews
+# find out where is rnews program in your system - there may be
+# several ones called `rnews'. Yours must be setuid or setgid,
+# typically.
+#
+# Below are several variants of defining RNEWS. The simplest one involves
+# use of my mail2news gateway for STUMP users.
+#
+# Use this one if you want to use my gateway -- SIMPLEST way to do it.
+# RNEWS="sendmail -f devnull@stump.algebra.com news-gateway@stump.algebra.com"
+#
+# Note that the -f flag is used to prevent any antispamming system from
+# rejecting email to the news gateway.
+#
+# Use this only if you want to use your own rnews -- a pain in the
+# neck if you do not know well how news servers work.
+# RNEWS="/usr/lib/news/rnews -h $IHAVE_SERVER -S $IHAVE_SERVER "
+#
+# OR may be something like this if you have inews only:
+# [you may have problems with "hostname" on bsd-derived systems]
+#RNEWS="/usr/lib/news/inews -h "; export RNEWS
+RNEWS="%BASEDIR%/inews"
+
+#RNEWS="sendmail -f devnull@stump.algebra.com news-gateway@stump.algebra.com"
+export RNEWS
+
+# ATTENTION!!!
+# MORE ABOUT RNEWS/INEWS: unfortunately, these programs differ on many
+# systems. Some of the BSD-derived systems have "broken" inews and rnews
+# that does not like another program "hostname".
+#
+# If you see error messages about "hostname" in ~/Mail/from, you should
+# either disregard them, or use the "hostname" shell script provided in
+# stump/etc. Do the following:
+#
+# cd $HOME/stump/etc
+# mv hostname.REPLACEMENT hostname
+#
+# Edit "hostname" and set your host name and fully qualified hostname.
+#
+
+############################################################ Internal vars
+#
+# Do NOT change this section
+#
+
+if [ "$PGP" = "none" ] ; then
+ PMAPP=cat
+ export PMAPP
+fi
+
+#######################################################################
+# Directory for temp files. This directory must NOT be writable by general
+# public, for security reasons. I suggest keeping this intact.
+#
+
+TMP=$MNG_ROOT/tmp; export TMP
+
+BEGIN_PGP_SIGNED_MESSAGE="-----BEGIN PGP SIGNED MESSAGE-----"
+BOT_SUBJECT_PREFIX="KEGHF894ND50MJ"
+
+export BEGIN_PGP_SIGNED_MESSAGE BOT_SUBJECT_PREFIX
+
+
+################################################################# Invocation
+#
+# DO NOT EDIT
+#
+# I use `antivirus' program as additional protection from all sorts
+# of attempts to exploit bugs in moderation programs. Antivirus replaces
+# all suspicious characters by '_' and splits too long lines.
+#
+
+if [ "x$1" != "x" ]; then
+ umask 077
+ antivirus | decodeBase64 | "$@"
+fi
--- /dev/null
+#######################################################################
+#
+# This file contains a database of current moderators. Any moderator
+# can be either in "active" or "inactive" status. (frequently the
+# inactivbe status is called "vacation" :). The format of this
+# file is:
+#
+# email Active? Mode
+#
+# (of course, with no leading "#" sign). Any line with the first
+# character equal to # sign is ignored.
+#
+# Flag 1 means that the moderator is active, flag 0 means that the
+# moderator is in vacation.
+#
+# Mode NO_ADVICE_LIST means that the moderator is not interested in the
+# moderators-advice mailing list from isc.org. If you have not started
+# receiving this list, do not worry -- you will find out whether you
+# want to receive messages or not, later.
+#
+# Mode NOKOI means that the moderator is unable to read the upper part
+# of the ascii table. Most likely it is NOT something that is of interest
+# to you.
+#
+# EMPTY LINES ARE NOT ALLOWED!!!
+
+%MODEMAIL% 0 NO_BOARD_LIST,NO_ADVICE_LIST
+%OURUSER%+%ABBREV%-internal-webstump/%KEYSTUMP2WEB%@%DOMAIN% 1 NO_BOARD_LIST,NO_ADVICE_LIST
--- /dev/null
+#!/bin/sh
+#
+# This script sends an email to a group of people listed in
+# env var RECIPIENTS (we create this var here from etc/moderators)
+#
+# It is used to maintain the little internal mailing list for all
+# human moderators of your newsgroup.
+#
+
+FILTER="NO_$2_LIST";
+
+RECIPIENTS="`cat $MNG_ROOT/etc/moderators \
+ | grep -v "$FILTER" \
+ | grep -v '^#' \
+ | awk '{print $1;}' \
+ | tr '\n' ',' `"
+
+(
+ formail \
+ -I "To: discard-all@chiark.greenend.org.uk" \
+ -I "From " -I "Cc:" \
+ -I "X-Loop: $BOARD" \
+ -I "X-Mailing-List: $BOARD ($NEWSGROUP Moderators)" \
+ -I "Reply-To: $1" \
+ -I "Resent-To:" \
+ -I "X-Maintainer: $ADMIN" \
+ -I "Errors-To: $ADMIN"
+ cat $MNG_ROOT/etc/mods.sig
+) | sed 's/^\.$/\.\./' | sendmail $RECIPIENTS
--- /dev/null
+#!/bin/sh
+
+# This file creates a little .posted_log file in your home
+# directory. Runs if activeated by crontab. See your crontab
+# file for more details.
+
+# You may omit this file when initially setting up STUMP.
+
+(
+ echo -n `date` "Number of articles: "
+ grep processApproved < $HOME/Mail/from | wc -l
+) >> $HOME/.posted_log
+
+(
+cat << _EOB_
+The information below shows the total number of articles posted
+for the last 10 days. The totals start with some date in the past.
+What is important is daily differences between totals.
+
+_EOB_
+
+tail $HOME/.posted_log
+
+)| mail -s "Number of posted Articles" $1
--- /dev/null
+UNUSED::AFAICT the contents of file is not used when using webstump -iwj
+offtopic::Message is grossly off topic (spam, turks, etc)
+crosspost::Inappropriate crossposting
+hostile::Message of harassing/insulting/hatemongering content
+format::Message is inappropriately formatted (eg, binary, HTML)
# Edit these variables
-WEBSTUMP_HOME = /home/webstump/live/webstump
+WEBSTUMP_HOME = %BASEDIR%/webstump
CC = cc
# do not edit below
-Welcome to the new version of WebSTUMP.
-This version supports picture attachments and makes other improvements.
+Welcome to the chiark version/derivative of STUMP/WebSTUMP.
+This version has been substantially modified.
print "Creating files in $dir...";
-&append_to_file( "$dir/blacklist", "" );
&append_to_file( "$dir/moderators", "ADMIN \U$password\n" );
&append_to_file( "$dir/rejection-reasons",
"offtopic::a blatantly offtopic article, spam
harassing::message of harassing content
charter::message poorly formatted
" );
-&append_to_file( "$dir/whitelist", "" );
print "\b\b\b done.\n";
for example, \"xyzzy\" and \"XyZZY\" are equally valid.<P>
";
- print "
- Log in as \"admin\" if you want to
-<UL>
- <LI> edit filtering lists.";
-
- &link_to_help( "filter-lists", "Filter Lists" );
-
- print "
- <LI> add/delete users or change their passwords.
- <LI> First Time Users: You have to log in as admin and add a moderator user
- who will be able to moderate the newsgroup. Then log in again as that
- user. If you are a new user, you have to have your admin password assigned to
- you by the administrator.
-</UL>
-
-";
+# print "
+# Log in as \"admin\" if you want to
+#<UL>
+# <LI> edit filtering lists.";
+#
+# &link_to_help( "filter-lists", "Filter Lists" );
+#
+# print "
+# <LI> add/delete users or change their passwords.
+# <LI> First Time Users: You have to log in as admin and add a moderator user
+# who will be able to moderate the newsgroup. Then log in again as that
+# user. If you are a new user, you have to have your admin password assigned to
+# you by the administrator.
+#</UL>
+#
+#";
&end_html;
}
print "Creating files in $dir...";
- &append_to_file( "$dir/blacklist", "" );
&append_to_file( "$dir/address.txt", "$address\n" );
&append_to_file( "$dir/moderators", "ADMIN \U$password\n" );
&append_to_file( "$dir/rejection-reasons",
harassing::message of harassing content
charter::message poorly formatted
" );
- &append_to_file( "$dir/whitelist", "" );
print " done.\n";
--- /dev/null
+%OURUSER%+%ABBREV%-internal-approve/%KEYWEB2STUMP%@%DOMAIN%
--- /dev/null
+xdiscardddd-adll@chiark.greenend.org.uk
--- /dev/null
+From: %OURUSER%@%DOMAIN%
+To: %MODEMAIL%
+Subject: %ABBREV% webstump pass/block/holdlist update
+
+A change has been made to one of the control lists:
--- /dev/null
+discard::SILENTLY DISCARD (eg because message is spam)
+abuse::message is rude and abusive
+repetition::message is excessively repetitious
+crosspost::crossposting to that newsgroup is not permitted
+charter::not in accordance with the charter
+test::message is a test
+meta::unconstructive or excessive metadiscussion
+inflammatory::needlessly inflammatory
+mistake::appears to have been posted in error
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>