Last update 25-Jul-1999

# MBSE BBS - Internet Gateway - INN.

###

SETUP INND

Below are the files that you need to setup for INN news.

    ##  $Revision: 1.6 $
    ##  inn.conf -- inn configuration data
    ##  Format:
    ##	<parameter>:<whitespace><value>
    ##  Used by various programs and libinn.  The following parameters are defined:
    ##	domain		Local domain, without leading period.
    ##  	fromhost	What to put in the From line; default is FQDN
    ##			of the local host.
    ##	moderatormailer	Where to mail moderated postings, if not found
    ##			in the moderators file; see moderators(5).
    ##	pathhost	What to put in the Path and Xref headers; default
    ##			is FQDN of the local host.
    ##	organization	If $ORGANIZATION doesn't exist.  What to put in
    ##			the Organization header if blank.
    ##	server		If $NNTPSERVER doesn't exist.  Local NNTP server
    ##			host to connect to.
    ##
    organization:	MBSE BBS for Linux Development.
    server:		seaport.mbse.nl
    domain:		mbse.nl
    ##  end of inn.conf

    ##  $Revision: 1.7 $
    ##  hosts.nntp - names and addresses that feed us news
    ##  Format
    ##	<host>:
    ##	<host>:<password>
    ##  <host> can be a name or IP address; no wildcards.  Any hosts not
    ##  listed here are handed off to nnrpd.
    localhost:
    seaport.mbse.nl:
    ##  end of hosts.nntp

    ##  $Revision: 1.9 $
    ##  expire.ctl - expire control file
    ##  Format:
    ##	/remember/:<keep>
    ##	<patterns>:<modflag>:<keep>:<default>:<purge>
    ##  First line gives history retention; other lines specify expiration
    ##  for newsgroups.  Must have a "*:A:..." line which is the default.
    ##	<patterns>	wildmat-style patterns for the newsgroups
    ##	<modflag>	Pick one of M U A -- modifies pattern to be only
    ##			moderated, unmoderated, or all groups
    ##	<keep>		Mininum number of days to keep article
    ##	<default>	Default number of days to keep the article
    ##	<purge>		Flush article after this many days
    ##  <keep>, <default>, and <purge> can be floating-point numbers or the
    ##  word "never."  Times are based on when received unless -p is used;
    ##  see expire.8

    ##  If article expires before 14 days, we still remember it for 14 days in
    ##  case we get offered it again.  Depending on what you use for the innd
    ##  -c flag and how paranoid you are about old news, you might want to
    ##  make this 28, 30, etc.
    /remember/:28

    ##  Keep for 1-10 days, allow Expires headers to work.
    *:A:1:10:never

    fido.*:A:1:30:90
    iba.*:A:1:30:30
    alt.*:A:1:30:30
    rec.*:A:1:30:30
    junk:A:3:3:3
    ## end of expire.ctl

    ##  $Revision: 1.7 $
    ##  Mailing addresses for moderators.
    ##  Format:
    ##	<newsgroup>:<pathname>
    ##  First match found is used.
    ##	<newsgroup>	Shell-style newsgroup pattern or specific newsgroup
    ##	<pathname>	Mail address, "%s" becomes newgroup name with dots
    ##			changed to dashes.
    fido.*:%s@seaport.mbse.nl
    iba.*:%s@seaport.mbse.nl
    ##  end of moderators

    ##  $Revision: 1.17 $
    ##  newsfeeds - determine where Usenet articles get sent
    ##  Format:
    ##	site[/exclude,exclude...]\
    ##		:pattern,pattern...[/distrib,distrib...]\
    ##		:flag,flag...\
    ##		:param
    ##  Summary of flags:
    ##	<size		Article must be less then size bytes.
    ##	Aitems		Article checks -- d (must have Distribution header)
    ##			p (don't check for site in Path header).
    ##	Bhigh/low	Internal buffer size before writing to output.
    ##	H[count]	Article must have less then count hops; default is 1.
    ##	Isize		Internal buffer size (if a file feed)
    ##	Nm		Only moderated groups that match the patterns.
    ##	Nu		Only unmoderated groups that match the patterns.
    ##	Ssize		Start spooling if more than size bytes get queued.
    ##	Ttype		Feed types -- f (file) m (funnel; param names the
    ##			real entry) p (pipe to program) c (send to stdin
    ##			channel of param's sub-process); x (like c, but
    ##			handles commands on stdin).
    ##	Witems		What to write -- b (article bytesize) f (full path)
    ##			g (first newsgroup) m (Message-ID) n (relative
    ##			path) s (site that fed article) t (time received)
    ##			* (names of funnel feed-in's or all sites that get
    ##			the article) N (Newsgroups header) D (Distribution
    ##			header) H (all headers) O (overview data) R
    ##			(replication data).
    ##  Param field depends on T flag.  For Tf, relative paths are from the
    ##  out.going directory.  For Tp and Tc, it is a shell command to execute.
    ##  If a Tm refers to this entry (which will have its own T param) then "*"
    ##  is expanded to all the funnel sites that triggered this one.  Useful
    ##  for spawning one mail process, e.g.
    ##
    ##  This file is complicated -- see newsfeeds.5!

    ##  This is the local site.
    ##  The "pattern" field gives the intial subscription list for
    ##  all other sites.  You might want to put "!control,!junk,!<local>.*"
    ##  there.  The "distrib" subfield limits incoming articles.
    ##
    ##  You can also have ME/bad.site: to refuse articles from a particular
    ##  site (by matching the Path: entry).  Other pseudo-sites may be put
    ##  in here, to REFUSE certain types of 3rd-party cancel messages
    ##  (See the "Cancel FAQ" news.admin.net-abuse.misc):
    ##	cyberspam	Spam cancels, munged articles, binary postings
    ##	spewcancel	just munged articles from runaway gateways
    ##	bincancel	just binary postings to non-binaries groups
    ##
    ##  Note that refusing articles means you won't offer them to sites you feed

    ##  Default newsgroups for Fidonet and partly internet.
    ME:!*/fido,local,alt,rec,iba::

    ## Create the links for cross posted articles
    crosspost:*:Tc,Ap,WR:/usr/news/bin/crosspost

    # Feed all moderated source postings to an archiver
    source-archive!:!*,*sources*,!*wanted*,!*.d\
    	:Tc,Wn:/usr/news/bin/archive -f -i /usr/spool/news.archive/INDEX

    ##  News overview
    overview!:*:Tc,WO:/usr/news/bin/overchan

    ## Fidonet Gateway
    f899.n2801\
    	:fido.*/fido\
    	:Tf,Wfb,B4096/1024:

    f99.n100/f99.n100.z92.bibnet\
    	:iba.*,local.*/iba,local\
    	:Tf,Wfb,B4096/1024:
    ##  end of newsfeeds

The next file, send-ifmail, comes from the ifmail package. This file must be placed in /var/news/etc (or wherever you newsconfig files are) and must be owned by user news, group news, mode 0550. You must edit this file before it can be used. The lines with innshellvars and ifnews in it must be adjusted to the paths on your system.

    #! /bin/sh
    ##  $Revision: 1.11 $
    ##  send-ifmail  -  SH script to send UUCP batches out.

    ##  =()<. @<_PATH_SHELLVARS>@>()=
    . /var/news/etc/innshellvars

    PROGNAME=`basename $0`
    LOCK=${LOCKS}/LOCK.${PROGNAME}
    LOG=${MOST_LOGS}/${PROGNAME}.log

    MAXJOBS=200
    UUXFLAGS="- -r -gd"

    ##  Start logging.
    test ! -f ${LOG} && touch ${LOG}
    chmod 0660 ${LOG}
    exec >>${LOG} 2>&1
    echo "${PROGNAME}: [$$] begin `date`"
    cd ${BATCH}

    ##  Anyone else there?
    trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15
    shlock -p $$ -f ${LOCK} || {
        echo "${PROGNAME}: [$$] locked by [`cat ${LOCK}`]"
        exit 0
    }

    ##  Who are we sending to?
    if [ -n "$1" ] ; then
        LIST="$*"
    else
        LIST=`ls /usr/spool/news/out.going|egrep "f[0-9]*.n[0-9]*$"`
    fi

    case ${HAVE_UUSTAT} in
    DONT)
        TEMP=${TMPDIR}/uuq$$
        uuq -h |tr -d : >${TEMP}
        ;;
    esac

    ##  Do the work...

    for SITE in ${LIST}; do

        ##  See if any data is ready for host.
        BATCHFILE=${SITE}.uucp
        if [ -f ${SITE}.work ] ; then
    	cat ${SITE}.work >>${BATCHFILE}
    	rm -f ${SITE}.work
        fi
        mv ${SITE} ${SITE}.work
        ctlinnd -s -t30 flush ${SITE} || continue
        cat ${SITE}.work >>${BATCHFILE}
        rm -f ${SITE}.work
        if [ ! -s ${BATCHFILE} ] ; then
    	echo "${PROGNAME}: [$$] no articles for ${SITE}"
    	rm -f ${BATCHFILE}
    	continue
        fi

        ##  Get the compression flags.
        echo "${PROGNAME}: [$$] begin ${SITE}"
        case "${SITE}" in
        phreak)
    	COMPRESS="compress"
    	;;
        *)
    	COMPRESS="gzip"
    	;;
        esac

        time batcher \
    	-p"/opt/mbse/bin/ifnews %s" \
    	${SITE} ${BATCHFILE}

        echo "${PROGNAME}: [$$] end ${SITE}"
    done

    case ${HAVE_UUSTAT} in
    DONT)
        rm -f ${TEMP}
        ;;
    esac

    ##  Remove the lock file.
    rm -f ${LOCK}

    echo "${PROGNAME}: [$$] end `date`"

    ##  end of send-ifmail

Go back Go to main