
# 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.
#
#  The GLOBAL label is applied prior to the label assigned to the incoming
#  connection.  It may be used as a global group filter, global spam filter,
#  or global alias filter (alias out spam or cancelbot sites)
#
#  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 GroupDef GLOBAL ****************************
#		|	|	|	|
#		v	v	v	v
#
#  alias	-	Y	-	Y
#
#	Alias outbound feeds for the destination 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	-	-	Y
#
#	Filter an inbound Newsgroups: element.  Wildcards are ok.  If the
#	inbound feed's Newsgroups: line contains the specified group, the
#	article is discarded no matter what other groups may appear.  Used
#	to prevent external sources from crossposting to internal groups.
#
#  maxcross	-	Y	-	-
#  maxpath	-	Y	-	-
#  maxsize	-	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.
#
#  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.
#
#  COMMAND   Inbound Outbnd GroupDef GLOBAL ****************************
#
#  groupref	-	Y	Y	-
#
#	Reference a label defined by 'groupdef'
#
#  addgroup	-	Y	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	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	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.
#
#  delgroupany	-	Y	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	-	-	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	-	-	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.
#
#  label/end
#
#	Label a feed.   See the examples below.
#
#  groupdef/end
#
#	Label a command group.  Only commands marked 'Y' for 'GroupDef'
#	in the above list are allowed.
#

# DEFAULT ENTRY - applies to inbound feeds that have no label assigned to
#	          them in the diablo.hosts file.
#
#

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.

label	GLOBAL
    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*
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*
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
#

label	fubar
    alias	news.fubar.net
    filter	best.*
    maxsize	200k
    maxcross	8
    delgroup	*
    addgroup	ba.*
    addgroup	biz.*
    addgroup	comp.*
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...
#
