
# DNEWSFEEDS	SAMPLE
#
#  The DEFAULT label only applies to incoming connections which have not
#  been labeled.  It was renamed from ME so as not to be confused with INNs
#  ME.  THIS LABEL IS NO LONGER USED BY DIABLO.  Diablo now requires that
#  all incoming feeds be labeled via diablo.hosts and for that label to 
#  exist in dnewsfeeds.
#
#  The GLOBAL label is applied prior to the label assigned to the incoming
#  or outgoing connection.  It may be used to specify global defaults for 
#  both the incoming and outgoing sides of a feed.
#
#  groupref/groupdef are used to define groups and then reference them in
#  feed labels.  These are capable of recursion.  Diablo now allows all
#  directives normally specified in a label to also be specified in a 
#  group recursion.
#
#  To filter inbound articles in general, use an expiration of
#  0 days in dexpire.ctl.  XXX TO BE FIXED
#
#  WARNING!  control messages add a pseudo-newsgroup called 'control.MSGTYPE'
#	     to the newsgroup list for filtering purposes.  Thus, if you
#	     do an 'addgroup *' and then delgroup the groups you don't want,
#	     you will still receive ALL control messages.  See the nntp2a/c
#	     example below for how to include control messages IN the filter.
#
#  COMMAND   Inbound Outbnd
#		|	|
#		v	v
#
#  alias	-	Y
#
#	Alias outbound feeds for the destination feed based on the Path: 
#	header.   If the specified wildcard appears in the Path: header, 
#	the article will NOT be propogated to this outbound feed.  This is 
#	normally used to prevent an article received from this particular 
#	feed to be requeued back out to the same feed.
#
#  filter	Y	-
#
#	Filter an inbound Newsgroups: element.  Wildcards are ok.  If an
#	article on the inbound feed conatins the specified group(s), the
#	article will be discarded no matter what other groups may appear.
#	Used to prevent external sources from crossposting to internal groups.
#
#  nofilter	Y	-
#
#	unFilter something that might have previously been filtered.  For 
#	example, you may have a groupref which filters best.* and a specific
#	feed which you want to allow best.test postings to pass through.
#
#  nomismatch	Y	-
#
#	Surpress MISMATCH errors when checking the incoming Path: against
#	aliases.  This option is not normally used.
#
#  maxconnect	Y	-
#
#	Specify the maximum number of parallel connections per client IP
#	for the incoming feed(s) associated with this label.  If smaller then
#	the global maxconnect (see diablo.config, diablo man page), this value
#	overrides the maxconnect for all IP's connecting to this label.  Each
#	distinct IP connecting to this label is independantly limited by this
#	parameter.
#
#  maxcross	-	Y
#  maxpath	-	Y
#  maxsize	-	Y
#  minsize	-	Y
#  mincross	-	Y
#  minpath	-	Y
#
#	Applies to outbound feeds.  Articles are not queued to the outbound
#	feed if they exceed the specified numeric parameter for the maximum
#	number of cross postings, maximum number of Path: elements, or
#	maximum article size non-inclusive of its headers.
#
#	You can also specify a minimum article size, path length, and minimum
#	number of cross postings.  This is usually used to extract out large
#	or heavily cross posted articles.
#
#	NOTE!!!!!!!!! When specifying size, the size is in bytes unless you
#	postfix the number with 'k' (kilo), or 'm' (mega).  If you forget,
#	your size will be bytes and probably not be what you expect.
#
#  rtflush	-	Y
#
#	Diablo normally buffers writes to its queue files.  If a queue file
#	operated on in realtime, however (see 'realtime' option for 
#	dnntspool.ctl), it is sometimes better to have diablo write the 
#	queue file unbuffered.  rtflush accomplished this.
#
#  nortflush	-	Y
#
#	If you specified rtflush previously (for example, in a groupref), you
#	can undo it here.
#
#  nospam	-	Y
#
#	Only feed non-spam articles.  The default is to feed all articles
#	whether spam or not.  This option is unusable in a GLOBAL entry.
#
#  onlyspam	-	Y
#
#	Only feed spam articles.  The default is to feed all articles
#	whether spam or not.  This option is unusable in a GLOBAL entry.
#
#  COMMAND   Inbound Outbnd
#
#  groupref	-	Y
#
#	Reference a label defined by 'groupdef'.  This is recursive.
#
#  addgroup	-	Y
#
#	If any group in the article's Newsgroups: line matches the wildcarded
#	groupname, the article will be included	in the outbound feed.  Later
#	addgroup/delgroup commands override earlier ones.
#
#	NOTE: if you addgroup *, then delgroup the groups you do not want,
#	all control messages will still be propogated even for the groups
#	you don't want.  The solution is to follow the 'addgroup *' with
#	a 'delgroup control.*', so only control messages that pass the
#	remainder of your filter are propogated.
#
#  delgroup	-	Y
#
#	If any group in the article's Newsgroups: line matches the wildcarded
#	groupname, the article will be excluded in the outbound feed.  Later 
#	addgroup/delgroup commands override earlier ones.
#
#  requiregroup -	Y
#
#	Require that the group appear in the Nesgroups: line.  Generally used
#	when splitting control messages off.  e.g. 'requiregroup control.*'.
#	the requiregroup commands usually occur at the END of the list.  If
#	you have multiple requiregroup directives, the article passes if
#	at least one is in the Newsgroups: line.
#
#  delgroupany	-	Y
#
#	If any group in the article's Newsgroups: line matches the wildcarded
#	groupname, the article will be excluded in the outbound feed, even
#	if other groups in the article's Newsgroups: line match other addgroup
#	commands.  i.e. you can exclude an article if it is crossposted to 
#	a set of groups even if you accept the other groups the article is
#	posted to. 
#
#  addspam	Y	-
#
#	Any article with an NNTP-Posting-Host: matching this wildcard is
#	automatically considered spam and rejected.  The message-id will
#	be added to the history file to prevent further occurances of this
#	message-id.  The data field should begin and end with '*', see
#	the example below.
#	
#  delspam	Y	-
#
#	Any article with an NNTP-Posting-Host: matching this wildcard is
#	automatically considered to NOT be spam and accepted even if the
#	article exceeds the rate limit.  The data field should begin and end
#	with '*', see the example below.
#
#  adddist	-	Y
#  deldist	-	Y
#
#	Allow or disallow distributions for a feed (Distribution: header).
#	These command do NOT accept wildcards.  You must specify explicit
#	distributions.
#
#	If no adddist or deldist distributions are specified, the article
#	is passed.
#
#	If a distribution matches anything on the deldist list, the article
#	is dropped, even if valid matches occur against the adddist list.
#
#	If a non-zero number of adddist's are specified, the distribution 
#	must match at least one of them for the article to pass.
#
#  label/end
#
#	Label a feed.   See the examples below.
#
#  groupdef/end
#
#	Label a command group which can be referenced with 'groupref' from
#	within other groupdefs or labels.  There is no ordering requirement..
#	you can reference groups prior to defining them.  You should be 
#	careful of creating recursion loops, however.
#

# DEFAULT ENTRY - applies to inbound feeds that have no label assigned to
#	          them in the diablo.hosts file.  XXX NO LONGER USED XXX
#		  All inbound feeds must have an associated diablo.hosts
#		  label.
#

label	DEFAULT
    filter	best.*
end

# GLOBAL ENTRY - you should always have a GLOBAL entry and it should contain
# 		 a minimum of the commands shown below to prevent the 
#		 spam filter (which defaults to 'on') from incorrectly
#		 categorizing certain posting sources as spam.
#
#		 Typically these are sources which have reasonable spam
#		 policy but break the NNTP-Posting-Host: header by using
#		 the same header for all users.

label	GLOBAL
    #
    # turn off spam filter for these broken sites that use POST
    #
    delspam     *ladder*.news.aol.com*
    delspam     *ngsoap*.news.aol.com*
    delspam     *@bbs.oit.edu.tw*
    delspam     *ester.vr1.com*
    delspam	news.newsdawg.com
    delspam	*postnews.dejanews.com*
    #
    # pathalias out 'bad neighbors' - news sites that don't seem to give a shit
    # about the rest of the usenet (suggested list included)
    #
    # alias	*.hyperion.com
    # alias	crs19.crl.aecl.ca
    # alias	*.alt.net
    # alias	*.newscene.com
    # alias	*.newsguy.com
    # alias	*.usit.net
end

# Contact: xxx@yyy.com
#
#
# note: delgroupany means that if any group in the Newsgroups: line
# matches, the article is not fed even if other groups are acceptable.
#
# By deleting control.*, we only propogate control messages that are
# passed in those groups that are not filtered out.  Otherwise all
# control messages would be propogated.

label	sgigate
    alias	sgigate.sgi.com
    alias	news.sgi.com
    filter	best.*
    addgroup	*
    delgroup	control.*
    delgroup	bofh.*
    delgroup	best.*
    delgroup	alt.*
    delgroupany	alt.binar*
    delgroupany	alt.warez*
    maxconnect	5
end

# local redistribution
#
# note: groupref references a grouplist 'subroutine', which can be
# defined before or after the reference (see the end of this file)

label	nntp1
    alias	nntp1.best.com
    addgroup	*
    delgroup	control.*
    groupref	NOWAREZ
    groupref	NOPORN
end

# local redistribution with control messages split off into a separate feed.
#	The idea is allow control messages to bypass any normal article
#	backlog, giving us a better chance of getting cancels to the 
#	destination before the articles being canceled.
#
# NNTP2A:	Pass our standard feed MINUS any control messages.  We use
#		delgroupany to accomplish this.  (delgroup control.* would
#		still pass control messages posted to groups we do pass)
#
# NNTP2C:	Pass ONLY control messagse by running our standard group
#		filters, then tagging on a requiregroup command which then
#               picks only those messages that are ALSO in the control
#               group.
#
#		For the hell of it, we flush the queue file on a per-line 
#		basis (rtflush) to make the realtime option in dnntpspool.ctl
#		even faster.  rtflush is especially useful for partial feeds
#		that would otherwise not get flushed all that often due to
#		the buffering.

label	nntp2a
    alias	nntp2.best.com
    addgroup	*
    groupref	NOWAREZ
    groupref	NOPORN
    delgroupany	control.*
end

label	nntp2c
    alias	nntp2.best.com
    addgroup	*
    groupref	NOWAREZ
    groupref	NOPORN
    requiregroup control.*
    rtflush
end


#  Contact: xxx@yyy.com
#
#  NOTE!  don't forget the 'k' when specifying maxsize!

label	fubar
    alias	news.fubar.net
    filter	best.*
    maxsize	200k
    maxcross	8
    delgroup	*
    addgroup	ba.*
    addgroup	biz.*
    addgroup	comp.*
end

# Sometimes people need incoming-only feeds.  It is possible to optimize
# incoming-only feeds by specify the same label in diablo.hosts for all
# incoming-only hosts.  You then only need to configure a single label
# in dnewsfeeds as shown below.
#

label	incoming
    alias	*
    delgroup	*
end

# groupdef's can occur before or after they are used
#
#

# Example of a local diablo feeder sending to a local 
# diablo dreaderd.  In this case we have to set the 
# alias to 'dummy' in order to pass articles to the
# reader even they appear to have come *FROM* the same reader.
# This is because articles posted via the reader are 
# posted directly to an upstream site and must propogate
# back down to the reader in order to be indexed by the reader.
#
# We do this to allow alternative article numbering schemes
# to be used - where the article numbering may not be assigned
# by the reader.
#
# The second label should be used for readers that connect back
# to the feeder.  Note that we need *TWO* labels here... one for
# outgoing that does not filter loops out of the Path:, and
# one for incoming that properly names the source to prevent
# diablo from inserting a MISMATCH element into the Path: header.
# Your diablo.hosts should tie the POSTing connection from the
# reader to 'fromreader'.  The spool connection can tie into either.
#
# The incoming label allows read-only mode; this permits dreaderd
# to retrieve articles while the dhistory file is being reloaded.

label reader
    addgroup    *
    alias       dummy
    maxconnect 200
    rtflush
end

label fromreader
    delgroup	*
    alias	actual_reader_fqdn
    maxconnect 200
    allow_readonly
end

groupdef NOWAREZ
    delgroupany	alt.crack*
    delgroupany	alt.warez*
    delgroupany	alt.binaries.ware*
end

groupdef NOPORN
    delgroupany	alt.binaries.pictures.er*
end

# and so on...
#
