Installing GUP to handle requests from DOWNSTREAM sites
Making DNews automatically send GUP requests to UPSTREAM sites
How to use GUP with DNews 4.6 on Unix
GUP is an assistant utility installed and run on the news feeder site for IHAVE feeds to let the downstream site administrators modify their own newsfeed entries on the machine that is sending them a news feed.
They do this by sending email requests to the GUP robot, for example they might send something like:
site news.acme.com password delete * include * exclude *picture* include alt.pictures.fuzzy.animals exclude *sex* include *sci* quit
And this would automatically modify the feed entry to something like:
site news.acme.com
groups *,!*picture*,alt,pictures.fuzzy.animals,!*sex*,*sci*
...
DNews has built in support for 'sending' GUP messages upstream, to make DNews respond to GUP messages follow the instructions below.
pkunzip gup.zip mkdir \dnews\gup copy gup.exe \dnews\gup
notepad \dnews\gup\gup.conf
This file has one line per site. Each line contains three white-space separated tokens: news feedee sitename, password, and mailid. Eg:
news.acme.com secret andrew@acme.com news.fred.com secret2 manager@fred.com
When a news feedee server administrator sends in a request, the 'site' command must have a host and password that matches the entry in gup.conf. You will have to tell the admin for each site what you have set their GUP password to.
forward gup@your.server |d:\dnews\gup\gup.exe -a d:\dnews\spool\active.dat -m header.dat -d d:\dnews\gup -l gup.log
Now GUP should be able to handle the emails sent to gup@your.server but you still have to tell DNews about the GUP files for each news feed.
site me groups * site news.acme.com groups d:/dnews/gup/sites/news.acme.com/groups type live site news.fred.com groups d:/dnews/gup/sites/news.fred.com/groups type live ....(Prior to DNews 4.7 you would have to use a cron job to patch the newsfeeds.conf file together and send a reload command to DNews, details are given lower down on doing this)
Make it a member of "news" user group, so that it can access the active.dat file and all of the .conf file
ftp://ftp.isc.org/isc/inn/unoff-contrib/gup-0.4.tar.gz
Under Linux system you can use the following commands:
- gunzip gup-0_4_tar.gz
- tar -xvf gup-0_4_tar
make
This file has one line per site. Each line contains three white-space separated tokens: news feedee sitename, password, and mailid. Eg:
news.acme.com secret andrew@acme.com news.fred.com secret2 manager@fred.comWhen a news feedee server administrator sends in a request, the 'site' command must have a host and password that matches the entry in the 'config'
|"/home/gup/gup -a /var/spool/dnews/work/active.dat -d /home/gup -l gup.log "
Now GUP should be able to handle the emails sent to gup@your.site.name
With DNews 4.7 you can modify your newsfeeds entry like this:
site me groups * site news.acme.com groups /home/gup/sites/news.acme.com/groups type live site news.fred.com groups /home/gup/sites/news.fred.com/groups type live ....(Prior to DNews 4.7 you would have to use a cron job to patch the newsfeeds.conf file together and send a reload command to DNews, details are given lower down on doing this)
(this is all un-necessary with dnews4.7)
Then you should follow the steps to config GUP for DNews:
site me groups *,@*erotica*,@*erotic,@*sex maxcross 20 reject body 1-800-677.80
site mail smtp
site your.sit.name.com type builtin groups \
# End for site your.site.name.com
h=$1 cd /home/gup mkdir sites d=/home/gup/sites cd $d mkdir $h cp $d/../samplesiteheader $h/header cp $d/../samplesitetrailer $h/trailer
$ addsite feedee_site_1
#! /bin/sh # A script to rebuild the newsfeed file after a gup run # gup's home directory gup=/home/gup # altered sites beautification # may need customisation if you're not running BSD NetRel2 pr="pr -5 -a -t -o5" # your DNews newsfeeds file. this file is automatically updated by this script # by combining the feeds lists for all the sites that gup controls, along # with a general-purpose header and trailer for the file as a whole. # You can find the path for this file in dnews.conf newsfeeds=/usr/local/dnews/newsfeeds.conf # your DNews tellnews program ctlDnews=/usr/local/bin/tellnews # Your mail service program mailcmd=/usr/bin/mail PATH=/usr/bin:/bin ########################### end of user-config stuff ########################## tmpfeeds=/tmp/newsfeeds.$$ cd $gup ( # global header cat globalheader cd sites for h in *; do if [ -s $h/groups ]; then echo # header sed -e "s/HOST/$h/g" $h/header # body sed -e 's/$/,\\/g' -e 's/^/ /g' $h/groups # trailer sed -e "s/HOST/$h/g" $h/trailer fi done cd .. # global trailer cat globaltrailer ) >$tmpfeeds # commit the new version mv -f $newsfeeds.old $newsfeeds.old1 mv -f $newsfeeds $newsfeeds.old mv $tmpfeeds $newsfeeds cp $newsfeeds newsfeeds.copy # tell DNews about it $ctlDnews reload tail -20 /usr/local/dnews/dnews.log
IMPORTANT: The GUP will recreate the whole newsfeeds.conf file from scratch each time GUP runs. So DO REMEMBER that if you modified newsfeeds.conf file, you should also update the correspoinding parts in globalheader, globaltrailer, sites/sitename/header and sites/sitename/header.
Install DNews 4.6i or later.
Added new feature, with these settings DNews will send automatic GUP messages to an upstream site:
gup_site your.site.name your_gup_password gup_to upstream_robot@upstream.site gup_add comp.lang.* gup_mask *,!alt.* gup_at 1 23 mail_from news@your.server.name
That would send an email at 23:01 every night to the email address upstream_robot@upstream.site the message would add comp.lang.* to the list of groups to send, and only include cached groups that matched (*,!alt.*) The emails would appear to come from the user "news@your.server.name" this is required so that the GUP program recognizes who the commands are comming from.
Here is a more straight forward example
gup_site your.site.name your_gup_password gup_to gup@upstream.site gup_at 1 23 mail_from news@your.server.name