

dnews.conf
The dnews.conf file is where most settings are stored, unlike all other config files dnews.conf is stored in \winnt\system32\dnews.conf or on unix \etc\dnews.conf
All lines in dnews.conf have the following syntax:
Syntax: Setting Value
Setting (Symbol) |
Value (Example) |
Description |
access_twice |
true |
If this is 'true' dnews will try and lookup users by 'number' before attempting a DNS lookup which can slow dnews down. |
active_static |
true |
Stops new groups from being added by the sucking feed. Use this if your feed site has lots of groups you never want added into your active file. |
auth_case |
true |
Tells dnews to be case sensitive when testing usernames and passwords |
autoexpire |
95 |
Trigger an expire when disk usage hits 95% |
bind_in |
1.2.3.4 |
IP number of adapter to listen for connections on. |
bind_out |
1.2.3.4 |
IP number of adapter to use for output connections (typically sucking). These two settings only have meaning if you have multiple IP addresses for some reason. |
body_chunk |
20000 |
Sets the size of chunks to read from disk when a user reads an article, the default is 20000 |
bucket_size |
10000000 |
Sets the size of each bucket, optimally you want more than 10 buckets and less than 3000. 10MB is the default for spool areas over 100MB in size. |
cachedall |
true |
Pretend all groups are cached, use this if you are taking a full IHAVE feed in. This command stops the 'Downloading' messages appearing. |
cachedonly |
true |
Only accepts items into groups which are cached, this is used for the hybrid feed where items are sent by a feed but only taken if users are reading that particular group. |
cache_onxover |
true |
This makes dnews 'more' sensitive to users reading a group. Without this the group is not 'cached' unless an item is actually read but with this setting the group is 'cached' if an xover request is made for this group. |
cancel_anyone |
true |
Allows cancel messages to work even if they are not from the original poster. |
cancel_users |
me@here |
Only allow cancel messages from this person |
chan_nobuff |
true |
Use to help the Mosaic news reader to work. (it has a bug) |
config |
dnews_top: |
Directory for configuration files (*.conf) all except dnews.conf |
confirm |
*.this.place |
Send email confirmation to postings from these addresses. (set this to match your local email addresses) |
convert_add |
true |
Alters the behavior of tellnews spool_import/spool_convert to simply add the items rather than trying to 'replicate' the item numbers. |
convert_feed |
true |
This option allows the tellnews spool_import/spool_convert commands to send items to outgoing feeds. |
debug |
chan_read:chan_write: |
Use to set which debug lines should be printed to the log file. The parameters cannot be separated by spaces. The default setting is
control:db:cancel :file:lib:, warn: ,fatal:,post:,chan:,feed: ,hist:,nntp: ,str:,err:,debug:, expire:,info:, item:, group:,suck:, cmd:,ncmd:, init:,db:,mem:,"); |
debug_rotate |
10000 |
Automatically rotates log files (renames and deletes the oldest one) if more than 10000 lines are written. This is good if you have turned on debugging as you always have the last few thousands lines if a problem develops but you don't run out of disk space due to the huge log file. |
debug_rotate_in |
1000 |
Number of lines before .in file should rotate. Ver 4. |
debug_rotate_out |
1000 |
Number of lines before .out file should rotate. Ver 4. |
debug_store |
100 |
Stores the last 100 items as files, the items are stored before they are processed, this was used for finding items that crashed dnews, the last stored item was the problem. It is not an official setting. (i.e. it may be removed) |
df |
/usr/bin/df -Pk |
Define the df command to use on Unix systems, where to find it if necessary and the switches to use if needed. DNEWS expects the output to be in K blocks. df -k or df -Pk is often the correct setting. |
diskspace, diskspace2,..., diskspace8 |
diskspace 100 diskspace2 50 diskspace3 60 |
Define the size of each disk area. diskspace2 ... diskspace8 are Version 4 commands. Total disk space in megabytes a dynamic feed needs 20-200MBs, a full feed needs approx. 1000MB See Spool, below. |
expire_any |
true |
If a link of a cross post should be deleted during an expire, then all will be deleted, this fixes the problem of people cross posting binary messages to non binary groups and thus filling up your disk. |
expire_at |
5 23,3 |
Run an expire job at 5 past eleven and 5 past 3 in the morning. Unless expire_minutes is set to true the minutes value will be ignored. |
expire_chunk |
100000 |
Sets how many lines from the history file to expire in one go. Increasing this makes expire faster but uses more memory. Generally the default will be fine. |
expire_delay |
3 |
The maximum delay before dnews will expire some more items even if it is flat out answering user requests. (not generally needed) |
expire_fast |
true |
Increases priority of expire job to get it done fast in the night.. (not generally needed) |
expire_min |
10 |
This sets the maximum wasted space in the bucket files, the value is a percentage, the default is 10% or 5% if disk usage is above 90%. |
expire_minutes |
true |
Used to make dnews use the minutes setting in the expire_at rule. |
expire_small |
1000 |
When dnews is using more than 89% of the disk space there is a danger of it deleting to many items in one go, this setting is used to limit how many it deletes before checking to see if the disk is still almost full. |
feed_reader |
true (default) |
Sends the 'mode reader' command when connecting to a feeding site, this is the default. You will probably never have to change this setting. |
fts_dir |
d:\dnews\fts |
Sets the directory where the fts index files are being stored. (see the section on FTS for more details) |
fts_expire |
true |
Automatically set if fts_dir is true, this tells dnews to write a list of all expired articles so that the fts system can remove them from the fts database. |
groups_at |
20 |
2 Sets when dnews should check for newly created news groups on the site that it is sucking news from. (not needed with an IHAVE feed where the control news items perform this function). |
head_cache |
200 |
How many item headers to keep in memory, if you have memory to burn then a setting of 3000 will improve performance of some nntp commands. |
head_limit |
2000 |
Limits the size of headers to keep in the cache, the default is about 2000 |
hide_queue |
true |
Stops the list of groups being sucked from being shown in the 'Downloading...' message. |
history |
\dnews\spool |
Directory for history file, this could grow to 40MB for a full feed (80,000 blocks) |
history_min |
5 |
Pause if less than 'n' megabytes free. |
item_max |
100000 |
Sets the maximum size for any article that DNEWS can deal with, the default is 1,000,000. A smaller number will save memory. |
life |
30 |
Number of days to keep fetching a news group from the upstream server after someone reads an item in it. |
list_min |
300 |
How many groups need to be cached before the update method switches to the technique that works best for large numbers of groups. |
live_stream |
false |
stops live feeds from using the streaming extensions to send articles, (this configures automatically normally) |
log_ihave |
true |
Enables logging of ihave/takethis commands |
log_inline |
false |
Stops logging of all the 'item ok' messages inside the dnews.log file |
log_nntp |
false |
Stops logging all the nntp commands sent to dnews. |
logdir |
\dnews |
Directory to write log files. |
logdir_min |
5 |
Pause server if less than 5MB is left free on logging disk. |
loglvl |
info |
One of: error,warn,info,debug,flush There are four levels of error reporting, "error" includes serious errors, "warn" includes possible problems, "info" includes general information messages and "debug" which is used for tracing bugs. "flush" is the same as debug but the log file is flushed with every single line written, this is useful if the system is crashing but not providing a stack dump. |
loguse |
true |
Write a log of every item body read by users in the file used.log |
mail |
smtp |
This is only used on VMS systems. The name of the foreign email system on VMS, typically in% or smtp% (don't include the %) |
mail_from |
system@your.domain |
Sets the from address used when dnews sends a report or email confirmation to a user, this is sometimes needed by smtp servers which require a valid return address. |
manager |
system@here.this.place |
Email address of the news manager |
max_out |
10000 |
Limits the speed that any channel can read news articles in characters per second. |
max_speed |
10000 |
Limits the speed, in characters per second, that any channel can send news into dnews. |
myname |
news.this.place |
Your full Internet name, if left out this may be picked up from the system. It's best to put it in by hand to make sure it's right. See path_stamp below. |
newnews_users |
161.28.4.2,*.co.nz |
List of IP names or numbers from which to allow the newnews command. |
nntp_block |
true |
Sets all the sockets as blocking, we don't know why you would want to do this. |
nntp_feeder |
news.feeder.site groups username password |
The news site where you are going to SUCK a feed from. You need NNTP READER access to this site. If you are not sucking a feed then comment this line out. If you need to specify a PORT other than the default one (119) then add it on the end of the name, e.g. feeder.site.edu:2021 The groups field is optional, the default is *. The username and password are also optional, alternatively nntp_user and nntp_pass can be used to specify these.
nntp_logoff You are not one of our users Specifies the message to give to users who are not granted connect access via access.conf. |
nntp_pass |
mysecretword |
Use this if the site you are sucking from requires a username and password to access it. |
nntp_suck2, 3, 4 |
second.feeder alt.irc.* myuser mypassword |
Get irc groups from another news server, every 10 minutes, the user/passwords are optional. (also see update_groups) |
nntp_user |
jbloggs |
Use this if the site you are sucking from requires a username and password to access it. |
nntp_xposting |
true |
For a posting feed this lets you add a header which will identify any user that attempts to post spam through your server. |
no_newnews |
true |
Disables the newnews command. |
nocontrol |
true |
Prevents automatic creation of the 'control' news group. |
nodns |
true |
Stops DNEWS from doing reverse DNS lookups every time a user connects, you will have to put ip numbers into access.conf if you use this feature, but if your DNS is faulty or slow then this can improve connection times. |
nospacecheck |
true |
Stops dnews attempting to find out how much disk space is free. If this test is failing your server may pause itself so this setting gets it working again. This is quite safe as the test is only used as a backup check. |
nostream |
true |
Tells dnews to pretend it cannot take a streaming incoming feed. |
nwserver |
hostname |
Use on netware servers if NetWin suggests it should be used. |
open_block |
true |
Makes nntp open calls block the news server |
open_retry |
5 |
How long to wait after failing to open an nntp connection before retrying . |
org |
NetWin Ltd |
Sets the name to be added to local posts which do not have the Organization: header set |
org_replace |
true |
Forces local posts to have your organization name even if the news posting software attempted to put some other name in. |
out_size |
4000 |
Sets the size of packets to be sent in one write operation to a socket. |
path_stamp |
news.netwinsite.com |
The name used to stamp the path of messages that go through your system, this should be a fully qualified text name in lower case, it need not have a genuine DNS entry. Use this if your MYNAME parameter is a single word or a number. e,.g.myname 22.33.23.4 path_stamp news.netwinsite.com. Ver 4 |
pgppath |
c:\pgp |
The path of your PGP utility. If you use PGP to authenticate control messages then you may need to define this. |
pident |
true |
Enables pidentd checking (a way of authenticating users on multi user unix systems) |
port |
119 |
The TCP port which DNEWS should listen for incoming connections on. |
post_log |
true |
Logs every local message to a post.log file. |
post_route |
true |
Enables routing of incoming ihave messages to outgoing posting feeds. |
post_nosuck |
true |
This option disables the 'suck' that occurs when a group is posted to. |
postonly |
true |
Stops items from being posted locally until the 'echo' back from the feeder site, this gives a very clear confirmation that the message has been passed up stream. You cannot do this if you want to have local groups which are not on the site you are sucking from. |
ras_entry |
AOnline |
This setting is used to get DNEWS to automatically dial up, fetch news and hang up by itself and is an alternative to using ras_number, ras_username and ras_password."AOnline" should be the text name of the RAS phone book entry you wish to dial, if this settings is used then all of the following ras settings are not needed. Start up 'Dial Up Networking" to see the list of entries in your phone book. |
ras_number |
56779568 |
If you are have a dial up line to the Intenet you can on Windows have DNEWS automatically dial up, update news and then hang up. To do this you set the ras_number, ras_username and ras_password commands to the dial up phone number, your username and password respectively and DNEWS will automatically dial up in accord with your update rules. Alternatively simply set the ras_entry as described above and DNEWS will look up the informantion it needs. |
ras_username |
Username |
Refer ras_number
ras_password Password Refer ras_number |
replicate |
true |
Makes dnews use the same item numbers for each item as are used on the server it's sucking from. The result is a second server that mirrors the first. It is essential that you also set POSTONLY TRUE. |
report |
no |
Stops the daily email report from being sent to the manager after every expire run. |
send_at |
*5 * |
Send messages upstream when the time matches, this would do it every 10 minutes. e.g. at 1:05, 1:15... |
send_later |
true |
Stops DNEWS from attempting to send a post immediately, useful if you are using a dial up connection. You can trigger this by hand using 'tellnews requeue' |
sendmail |
/usr/ucb/sendmail |
Path to sendmail or equivalent software with switches. (only used on unix) |
slave_feed |
1.2.3.2,1.2.3.4 |
IP NUMBER of any host that will be sending an ihave feed to your news server. IP names cannot be used, sorry. |
slave_n |
3 |
Number of dnews processes to run, 2-5 is recommended. |
slave_ports |
7400 |
TCPIP ports to use for the slaves. (Just use the example it will work :-) |
slave_restart |
5 |
Restarts the slave processes at that time each day. (5a.m.) |
sort_chunk |
1000000 |
Sets how many items to read in one go when re-sorting the master index, setting this larger speeds up the sort but uses more memory. Ver 4 |
spool_free |
true |
This tells dnews to chose which spool area based on the amount of actual free space rather than it's internal count of how much space it's allowed to use. |
spool, spool2, ..., spool8 |
spool f:\spool spool2 g:\spool spool4 i:\spool |
Disk name (or logical) for news articles For use with multiple drives (upto 8). Spool2 ... Spool8 are Version 4 commands. Defines the disk areas that dnews can use to store it's buckets of news. See diskspace, above. |
spool_min |
5 |
Pause if less than 'n' megabytes free |
suck_batchn |
100 |
Maximum number of items to get from one group before going onto the next group. |
suck_batchsize |
1000000 |
Maximum bytes to get from one group before going onto the next group. Use this to stop dnews spending all day on a binary group. |
suck_disable |
true |
Disables sucking groups, but not getgroups, matchgroups, this is handy for keeping the active files in sync between two servers, it can be used with the xreplic setting below. |
suck_requeue |
true |
Tells dnews to reque a group that is not finished. |
suck_maxold |
1000 |
Limits the maximum number of old items that dnews should suck from a group. |
suck_maxgroups |
500 |
If more than this many groups become 'cached' dnews will 'uncache' all the groups, this is a good 'backstop' in case some user does something strange and manages to 'cache' 10,000 news groups. |
suck_stream |
true |
Makes dnews suck much faster, don't set this unless you need to as it hurts the server you are sucking from. |
suck_timeout |
300 |
How many seconds a sucking feed can be idle before dnews should close the connection to try and get it un-stuck. |
suck_uucp |
/uucp_in/*.bag |
Directory and file names of incoming uucp files. Every minute dnews will scan this directory and read in any files it finds, and then delete them. They should be in standard rnews format. |
tcp_nodelay |
true |
Sets the socket to send data immediately, this may solve problems with bugy news readers. (e.g. Mosaic news reader) The default is 'true' on NT, it should be changed to 'false' if you have hundreds of concurrent users. |
timeout |
30 |
Define how long to wait after a channel becomes idle before disconnecting it, the default is 120 minutes. |
timezone |
NZST |
Timezone hh:mm or timezone name, this setting is ignored on all systems except VMS. |
too_old |
50 |
Refuse items that were created more than this many days in the past, this prevents old items from being re-distributed when a machine dumps old news items onto the network. |
update_at |
*0,*5 * |
Check for new items every time the minutes end in a 5 or a zero and at any hour, e.g. every 5 minutes. |
update_at2, 3, 4 |
10 * |
Update setting for second, third and fourth feeds, check less frequently, every hour at 10 minutes past. |
update_groups1, 2, 3 |
*binary* 45 1 |
A way of getting specific groups more frequently, only works with the main feed. For example, get binary groups once a day at 1:45, this is in addition to the update_at setting, not instead of. |
uucp_crlf |
true |
Writes uucp files as MSDOS text files instead of proper unix format. |
workarea |
\dnews\spool |
Directory for work files (active.dat, *.feed, etc) |
workarea_min |
5 |
If less than 'n' megabytes are free on this disk then pause the news system, (stop accepting new articles) |
xover_cache |
4000 |
How many xover records to cache, this is the best way to improve performance if you have spare memory, set it as high as 15000. |
xover_dir |
/var/spool/xover |
Sets the directory to store the *.xov database files, if you define this copy *.xov from the workarea to the new directory and then restart dnews. |
xover_moved |
true |
If your xover directory is not on the spool disk then you should set this true so dnews doesn't add in the xover files into the diskuse total. |
access.conf
The access.conf file is very powerful, it can be used to control access to your server in many different ways and as a result it is also tricky to use. The main source of confusion comes because of two features, first the file is passed twice, once when a user connects, and a second time when/if they supply a password. The second tricky bit is that the 'last' matching rule in the file is used. So the order of rules is very significant.
Access.conf allows you to do all of the following:
- Allow ip numbers/names access
- Allow incoming IHAVE feed
- Allow users name and password access
- Allow DNEWS Manager/Tellnews commands
- Allow read and post protection separately
All access rules in access.conf have the following Syntax:
Syntax: host:perm:user:pass:groups [:extension settings]
Parameter |
Example |
Description |
host |
*.my.domain 161.29.4.* |
A wildcard name or number, this rule is only used if the connection matches this address. |
perm |
Read, Post, Ihave, logoff |
Allow any combination of reading posting or ihave feeding from this site. |
user |
chrisp |
Some news readers can send a user name, if so then it will be matched here, and the password can be checked. |
pass |
rumplestiltskin |
The password in plain text. |
groups |
*,!*.erotic.* |
Allow access to groups matching this wild card. |
extensions |
con=3 |
Limit individual ip addresses to 3 simultaneous connections. |
extensions |
users=20 |
Limit the users in this domain to 20 concurrent users |
extensions |
con=3,users=20 |
If both settings are set separate with a comma, not a colon |
Notes:
If <user> is "$lookup$" and <pass> is "$lookup$" then NT Authorization is used to lookup users via the nt database. Use a line like this in access.conf:
your.ip.range.*:read,post:$lookup$:$lookup$:*
At the same time you must add to dnews.conf "auth_case true" as NT username/passwords are case sensitive and by default DNEWS is not case sensitive.
Unlike other news implementations, you can permit reading and posting to different combinations of news groups, for example you may wish to allow students to read all groups but only post to local news groups.
The last matching line in the file is used. This file can be tricky to setup, if it doesn't work as expected check that you have the entries in the right order so that the last matching ip name does what you want.
The extension settings can get complex because the are not applied strictly by order as with the other settings this is because in both cases the extension rule is affected by other users so the logic cannot be worked out by a single parse of the file. As a result you cannot limit the number of concurrent users to overlapping ip ranges, for example:
*:read,post:::*:users=2
*netwinsite.com:read,post:::*:users=10
Would NOT work, because the limit of '2' would apply to everyone not just netwinsite.com users.
Example 1 : Extract access.conf
*:logoff:::*
*netwin.co.nz:read,post:chrisp:passwd:*
*netwin.co.nz:read,post:::*,!*sex*
161.29.1.*:read,post:::*,!*sex*
news*.mci.net:ihave:::*
mypc.netwin.co.nz:read,post:::*
Command |
Description |
*:logoff:::* |
Immediately closes a connection from anyone outside our domain |
*netwin.co.nz:read,post:chrisp:passwd:* |
Allows me to read and post to any news group (including the naughty ones) as long as I configure my news reader with the username: chrisp and password: passwd |
*netwin.co.nz:read,post::*,!*sex* |
Allows users to read and post to any newsgroup except ones with the word sex in the name. |
news*.mci.net:ihave:::* |
Allows an ihave feed from an MCI machine, e.g. news12.mci.net |
mypc.netwin.co.nz:read,post:::* |
Allows me to read all groups, even the naughty ones, from my own PC as long as it has a reverse DNS entry. |
Note: reverse DNS translation is often not properly setup, dont rely on it, always give ip numbers as well as names. You can give wildcard numbers like 122.33.44.* to allow everyone from a given subnet. Also consider using the 'nodns true' setting which stops DNEWS even trying to perform the reverse name translation, this can improve performance.
Complex access.conf Example
Here is a more complex example that would work: In this example we have two domains, 161.29.3.* and 161.29.4.*, one of which can have 50 concurrent users, the other 10, both are limited to 5 connections per reader to prevent a single reader hogging the system. We also have a username and password for the 'sex' groups. "naughty,secret", and two users have access to a private news group "netwin.private"
Example 2 - Extract access.conf
*:logoff:::*
161.29.*:read,post:naughty:secret:*,!netwin.private
161.29.*:read,post:joe:secret2:*,!*sex*
161.29.*:read,post:fred:secret3:*,!*sex*
161.29.3.*:read,post:::*,!*sex*,!netwin.private:users=50,con=5
161.29.4.*:read,post:::*,!*sex*:!netwin.private:users=10,con=5
expire.conf
This file can be tricky to use, remember order is significant!! It contains the rules that define how DNEWS will expire news.
The expiration file is very different from INN and CNEWS implementations, Rather than a simple set of rules, the DNEWS expire rules match both news group names and current disk usage, so as use increases the rules can become more strict.
In addition rules can specify minimum or maximum numbers of items, this allows a single rule to apply to groups which get 20 items a day, or 20 items a month.
Since 4.3 it's also possible to expire groups differently depending on whether or not anyone is reading them. (If no one is reading a group you might expire items after 1 day instead of 5)
By default, cross posted items are only deleted from disk when they have expired from every group that it has been cross posted to. This is logical, but allows abuse, by cross posting items to non binary groups your entire expire strategy is ruined. There is dnews.conf setting expire_any true which allows dnews to delete all the cross posts of an item as soon as one part expires.
Each line of the file must have the following format:
Syntax: UPTO x GROUPS wild KEEP n DEFAULT n PURGE n MAXITEMS n MINITEMS n UNREAD n
Setting |
Value (example) |
Description |
upto |
20% |
This rule applies if less than 20% of the disk space is full. This confuses a lot of people. Here's an example, say disk use is currently 25%, then any rule ABOVE 25% will apply, a 20% rule would be ignored. |
groups |
alt.*,comp.binaries.* |
This rule applies if the group matches this list |
keep |
2 |
Keep items for this many days even if they have already expired. (From the expire date in the article header) If the article has no expire header then this rule is ignored. If the article has an expire setting and is younger than the keep value it is kept regardless of the 'purge' setting. |
default |
10 |
Keep items this long and then delete unless the expiration date says to keep it longer. This is the 'main' control of how long items are kept together with the maxitems/minitems rules that will override this rule. |
purge |
35 |
Delete after this many days even if the expire header says to keep it longer. This should be set long enough to keep FAQ's and no longer to prevent abuse. A typical value is 30 to allow monthly posts. |
maxitems |
1000 |
Ignore the other rules and delete items until the most recent 1000 are left. Items with an expiration date will be left (e.g. faq's) |
minitems |
10 |
Don't apply any other rules if the group has less than this many items in it, this is good for making 'low volume' groups useable. |
unread |
3 |
If the group is not 'cached' (it has not been read recently) then delete items that are more than 3 days old. |
Example:
# Default rule
upto 10000% groups * keep 0 default 1 purge 10 maxitems 0 minitems 0
# Start to panic a little
upto 90% groups * keep 0 default 2 purge 33 maxitems 100 minitems 0
# Normal operation, put your meaningful settings here.
upto 60% groups * keep 2 default 5 purge 33 maxitems 1000 minitems 10
upto 60% groups comp.* keep 2 default 10 purge 33 maxitems 2000 minitems 10
# Lots of space, just stop things getting silly (e.g. 10000 items in...)
upto 30% groups * keep 2 default 17 purge 33 maxitems 3000 minitems 100
upto 20% groups * maxitems 2000
# Keep any local groups forever (this line must be last to work)
upto 1000% groups local.* keep 99999 minitems 10000
If disk use is 58% then the rules that will be applied are the upto 60% rules,once the usage goes past the upto value of a rule the rule is no longer matched on. DNEWS will use the last rule it finds that matches, searching from the top down. The upto 60% rules comprise of one rule for all groups and one rule for the comp.* hierarchy, the specific rule must be after the general rule or it will never be matched. DNEWS will apply the rule like this, if the item has an expire header DNEWS will apply the keep rule and keep the item for 2 days even if the expire header says not to. The default rule is the rule that gets applied to all of the articles, DNEWS will expire an item that it has had for more than this many days unless the expire header says not to, for the comp.* groups this is 10 days, for all of the other groups 5 days is applied. The purge setting removes anything that has been on the server for this many days even if the expire header says not to, this setting is used for removing periodic posts such as FAQ's. The maxitems and minitems settings override the other settings and will keep or remove items even if the other rules say not to. There are cases where the maximum and minimum counts may seem to not be applied, this is usually due to crossposts or to missing data for the history.dat file in which case a rebuild_index might be worth running (but this can take hours and does partly interrupt news operation so pick a time when not too many users are on).
newsfeeds.conf
This file controls feeds out of DNEWS to other sites, it defines the sites to feed news to, which news groups to feed to each site (including the sites you receive news from), the type of feed (eg builtin, live, uucp or program) and the nntp command used to send items (eg post or IHAVE).You can also exclude news recieved from one site from being sent to any specific site. For your main feed the exclude setting is set by default to prevent the system trying to send every article that comes in back to the feeder site.
The newsfeeds.conf file also controls feed(s) 'into' DNEWS via the special "ME feed" . This must be the first entry in newsfeeds.conf. and defines which groups will be accepted from any feed(s) into DNEWS. It also allows you to set specific accept/reject rules to automatically idnetify and remove spam articles.
Symbol |
Example |
Description |
site |
me $NNTP_FEEDER my.leaf.site |
The name of the site to feed, usually it's full Internet name. The 'me' feed must be the first one in the file. |
type |
One of: live, builtin, uucp, program |
Specifies the type of feed, if this is left out then a feed file will be written but the items will not be sent to anyone. The xmit service could then be used to send the items. |
posting |
(flag, no value) |
Specifies that the nntp 'post' command should be used to send items upstream. This gives your feeder site the job of deciding how to email postings to moderated groups. |
exclude |
feeder.real.name, feeder.third.name |
Use this if your feeder site is 'name stamping' articles with a name other than it's ip name. This MUST be right or DNEWS will attempt to echo everything it gets back to the feeder site. (check the path header) |
smtp |
(flag, no value) |
Specifies this is not really a feed, but on a vax it is actually the email queue used to send articles to moderated groups, this is only needed on VMS and then only if you are not using the 'POSTING' mechanism to feed upstream. |
maxcross |
50 |
Throw away items which are crossposted to more than '50' news groups. This is good for preventing 'spamming' which is where people post adverts and money making schemes to inappropriate news groups. |
groups |
rec.*,!alt.*,@*binaries* |
List of news groups or wild cards. The entire list is checked so ,!* on the end will block all news groups.
The '!' and '@' characters should both be read as 'not' however '@' also means, 'if this rule matches then don't allow any cross posts' Normally if an item was posted to three groups and two of them are 'rejected' the article would still be taken.
You can use the continuation character '\' on the end of the line, but there must be no spaces between the last group and the slash, and there must be a comma before the next group name. You can have leading spaces on the next line.
There must be no spaces between items in the list, e.g. "a, b" would not work but "a,b" would. |
maxsize |
100000 |
Limit items to 100K, the default is 1MB, if you want to make it larger than 1MB then you must also increase ITEM_MAX in DNEWS.CONF. Personally I think 100K is too big, ftp sites and web should be used for larger items. DNEWS will still download the items it just doesn't store them if they are larger than this setting. |
xreplic |
(flag no value) |
This is a modifier for a live feed, it makes dnews send out replicating feed. A replicating feed is one that matches article numbers on each slave so that the servers are 'identical' from the users perspective. You should use 'postonly true' in dnews.conf on the slave server. |
live_nchan |
3 |
The number of concurrent channels to use to send the live feed, 2 or 3 is recommended for a full feed. |
onlyposts |
true |
Only send 'local' posts to this feed. This is an alternative to trying to get the exclude setting correct. It basically means 'don't act as a news router' which is the default behavior. |
uucp_dir |
c:\uucpout |
Directory to write uucp files to. |
uucp_size |
100000 |
Max size at which to skip onto the next uucp file. |
uucp_n |
100 |
Max number of items before skipping to next uucp file. |
accept |
header|default|body "quoted string" |
Used to accept or reject messages based on content |
reject |
header|default|body "quoted string" |
Used to reject messages based on content |
Type builtin
No external program (like nntpxmit) is required for either the live,builtin or uucp feeds.
The builtin feed type is used for sending local posts back upstream, it can send using the standard nntp protocol 'IHAVE' or by using the 'POST' command like a news reader, this is controlled by the 'posting' switch. Here is an example:
site $nntp_feeder
groups *
builtin
onlyposts
posting
The 'builtin' feed type is not designed to send on a full feed, and if you don't have 'onlyposts' or 'path_max 4' or a correct 'exclude' setting then it could end up trying to send your entire feed back upstream.
Type live
The 'live' feed type is intended for sending a full feed (e.g. 8 articles per second or more) to another site. This option is very smart, it figures out whether or not the other end can 'stream' and it tries to send new articles as they arrive without even writing them to disk this is both very efficient and means that news is completely up to date. You can specify how many concurrent channels DNEWS should use to send items, we recommend at least 2, and maybe 3 or 4 if the remote end does not support streaming. Here is an example:
...
site downstream.news.server
groups *
type live
live_nchan 2
Type live - xreplic
One special option you can add to live feeds is 'xreplic' this instructs DNEWS to tell a slave news server what item number to use to store each message, this allows the slave server to appear identical to your master server. To setup a slave server you must also use the dnews.conf setting postonly true option in the slave server and configure it to send posts back to the master using a builtin posting feed. e.g. On the master you would have:
...
site local.slave.news.server
groups *
type live
live_nchan 2
xreplic
And on the slave
...
site local.master.news.server
groups *
type builtin
posting
Type uucp
The uucp type feed will write a news feed for a selection of groups to uucp format bag files.
site uucp1
groups local.chat,rec.humor,netwin.*
type uucp
uucp_dir c:\uucp1
uucp_size 4000000
uucp_n 500
This will create bag files in the c:\uucp1 directory, and switch every 4MB or 500 items to the next bag file.
Accept/Reject rules
With any feed in 'newsfeeds.conf' you can add accept/reject rules to control what news items to accept. Here is an example, by using these rules on the 'me' feed you effectively prevent spam from getting into your server.
site me
groups *
accept default
reject subject "sex"
accept newsgroups "sex"
accept newsgroups "erotic"
reject subject "make money fast"
This examples rejects any message with 'make money fast' anywhere in it's subject header, and also rejects articles that contain the word 'sex' in the subject unless they are in a news group that also contains the word 'sex'.
The list of rules is processed in order, and if the rule 'matches' then the 'result' is changed to accept or reject accordingly. You must have a default rule first. You can also match against the special header 'body' which is actually the entire body of the article, but this should be avoided as it is not efficient in this version (but this may be changed)
Example newsfeeds.conf
site me
groups *
maxcross 10
site $nntp_feeder
groups *
type builtin
site downstream.site
groups *
type live
live_nchan 2
site localposts
groups *
onlyposts
type uucp
uucp_dir c:\local_posts
This example would reject incoming messages cross posted to more than 10 groups, it would send local messages back to the site defined in dnews.conf as nntp_feeder. It would send a full feed to the downstream site 'downstream.site', and it would keep a copy of all local posts in the directory c:\local_posts in 'uucp' format. This is handy because you can always feed these items back into dnews at a later date if they are lost for some reason. (like a disk crash).
Setting your EXCLUDE parameter correctly:
In newsfeeds.conf you must set your exclude parameter to stop DNEWS from sending incoming messages back to your feed site. Although with version 4.3 you could use the options "maxpath 3" or "onlyposts" to prevent DNEWS from routing news.
However, ignoring those options, it's best to get the exclude setting correct. Lets assume your feed site is called fastfeed.world.net. You need to find out what it stamps onto news articles, to do this read a news article (and show all headers so you can see the PATH header)
e.g.
Newsgroups: alt.winsock.trumpet
Subject: Sportster Si does not seem to work with TRUMPET
Date: Thu, 26 Oct 1995 22:44:08
Organization: Personal
Lines: 8
Message-ID:
NNTP-Posting-Host: eagle28.sasknet.sk.ca
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
Path: yoursite.com! fast1.world.net! world.net! news.icix.net! esol.intermedia.com
Look thru the path, left to right, and find the first or most generic name for your feed site, in this case 'world.net' looks like the best name to choose. The second or third name in the list is usually correct.
So here is the entry you should put in newsfeeds.conf, you may need the builtin and posting settings as well but that is up to you.
site fastfeed.world.net
groups *
exclude world.net
builtin
You may need to delete your .feed and .sending files from the spool directory to clear out the backlog of articles queued. The exclude parameter can include wild cards or a list of values, e.g.
exclude *world.net,*.sprint*
moderators.conf
This file defines the moderators email for moderated groups. Articles sent to moderated groups are redirected by DNEWS to the group moderator. Each line follow the syntax:
Syntax: group(s) moderators_email_address
You should only need to touch this file if you want to add a local group and make it moderated. In that case add your groups at the top of the file as the first match is used.
If the email address contains a "%s" then that is replaced by the news group name with the dots changed into dashes. e.g. to moderate a group called "netwin.gossip.moderated"
netwin.gossip.moderated:chrisp@marc.cri.nz
gnu.*:%s@tut.cis.ohio-state.edu
*:%s@uunet.uu.net
control.conf
This file controls the action taken when control messages are received. This is the secret to the administration of news. Control messages are just like normal Usenet news articles, but they are read by your news server and make it automatically do things, like adding and deleting news groups. This may seem invasive but with dozens of news groups being created and deleted every day you really don't want to be doing this yourself.
See the section on Adding PGP authentication to control.conf if you are concerned about security issues involved with control messages. However there is not too much need for concern, DNEWS does not actually remove anything if a news group is deleted so it can always be recreated if necessary.
Here is an up to date copy of control.conf, you need to update this file periodically as news group administrators change. Click here for latest control.conf
Cancel messages are not processed by this file, for performance reasons they are dealt with differently.
The following control messages are checked by this file:
- newgroup
- rmgroup
- version
- checkgroups
- ihave
- sendme
- sendsys
- senduuname
However only the following four are implemented.
- newgroup
- rmgroup
- version
- checkgroups
Blanks are not allowed, e.g. :: would be misinterpreted.
For each type of control message, you can specify based on who sent it, whether or not to do what the message says, just log it, or email the message to the news administrator. The log file that DNEWS creates can be used to action the control messages at a later date as it contains valid commands.
All control messages are logged to files in the workarea as 'control_(message).(action)'
Format:
message-type:email-address:action
message-type rmgroup, newgroup, version
email-address A wildcard email address, e.g. news@trusted.site
action "drop", "log", "mail", "doit", "doit,mail", "doit,pgp"
Example:
all:*:*:mail
ihave:*:*:drop
sendme:*:*:drop
sendsys:*:*:drop
senduuname:*:*:drop
newgroup:tale@* .uu.net:comp.* ,misc.*, news.*, rec.*, sci.*, soc.*, talk.*:doit
rmgroup:tale@*.uu.net:comp.*, misc.*, news.*, rec.*, sci.*, soc.*, talk.*:doit