nntpswitch.conf¶
- nntpswitch.conf
- Description of nntpswitch.conf
- Main Configuration
- Path and File Configuration
- Timers Configuration
- Logging Configuration
- Posting Configuration
- Performance Tuning
- Misc Stuff
Description of nntpswitch.conf¶
This file holds the main configuration options, paths, ports, ip addresses, logging and system tuning.
Default values from nntpswitch.conf are displayed separately like this.
Main Configuration¶
ListenPorts: List the ports to which nntpswitch should listen for incoming connections.BindAddress: The address of an interface to bound to, or 0.0.0.0 for all interfaces.ListenPorts 25 80 119 1199
RunAsUser: The user to run as. This user should be listed in /etc/passwd and it's homedir should hold all configuration for nntpswitch. Most of the time this will be user news. If you're running in conjunction with other news software you could create a separate user.BindAddress 0.0.0.0
PidFile: The place to store the pid file. If you're using the StatisticsTimer then only the pid from the main nntpswitch process in written in the pidfile. Also the pidfile is created as user root on startup and change ownership to RunAsUser after dropping privileges.RunAsUser news
PidFile /var/run/nntpswitchd.pid
Path and File Configuration¶
BasePath: The basepath where all the configuration files residesAccessFile: The filename of the access configuration (mostly access.conf). If the filename starts with a / it is considered a full pathname, otherwise BasePath is prepended.BasePath /etc/nntpswitch
ServerFile: The server configuration file.AccessFile access.conf
OverviewFmtFile: This file specifies the overview format. Mostly not used, and most newsreaders ignore this anyway.ServerFile servers.conf
ActiveFile: The name of the active file. This file is generated by the updategroups command.OverviewFmtFile overview.fmt
NewsgroupsFile: The name of the newsgroups file. This file holds all newsgroup descriptions and is also maintained by the updategroups command.ActiveFile active
StatsFilePeriod: How many times to write the statistics file. This file can be used for rrdtool for example. Value in seconds.NewsgroupsFile newsgroups
StatsFile: The absolute location of the statsfile. This should have the full path name.StatsFilePeriod 60
StatsFile /tmp/.nntpswitch.stats
Timers Configuration¶
ServerReadTimeout: Timeout for server reads.ServerConnectTimeout: Timeout for server connections.ServerReadTimeout 300
ClientReadTimeout: Timeout for client considered dead.ServerConnectTimeout 4
ClientReadTimeout 300
Logging Configuration¶
LogWriteclient: Log all input from the client in news.debug.LogReadserver: Log everything read from the server, including articles! For debugging only!LogWriteclient 0
LogWriteserver: Log everything written to the server.LogReadserver 0
LogCommands: Log detailed command statistics.LogWriteserver 0
LogMissing: Log missing articles.LogCommands 0
LogAuthInfo: Log authinfo commands.LogMissing 0
LogAuthInfo 1
Posting Configuration¶
PostServer: Configure the posting hostPostServerPort: If the post server runs on another port, configure thisPostServer posthost.example.com
ModeratorDomain: NNTPSwitch doesnt support a moderators configuration. Instead it forwards everything to groupname@moderators.isc.orgPostServerPort 119
MailerPath: What too to use to send mail. Even if you use postfix or exim this command will probably be aliased by your system Installation.ModeratorDomain moderators.isc.org
MailerPath /usr/sbin/sendmail -oi -t
Performance Tuning¶
MaxConnections: Global max connections allowed. If you need to go over 8192 edit <tt>nntpd.h</tt> and change <tt>MAX_PROC</tt>BufSize: Internal buffer size for misc stuff.MaxConnections 500
SockBufSize: Overwrite the size of the socket buffer. If you leave this at 0 the kernel will autoconfigure it.BufSize 8192
ListenBackLog: Number of connections to hold in the backlog before dropping them.SockBufSize 0
DownDelay: After a server down after this many seconds, how many seconds to backoff the client.ListenBackLog 128
RetryDelay: This is the delay for backing off clients after they reach their connection limit. This will force clients to correctly configure their limits.DownDelay 4
RatePeriod: Recalibrate the rate limiter 5 times a sec. Anything else will make it slightly inaccurate.RetryDelay 2
RatePeriod 5
Misc Stuff¶
DenyNoIndexField: Deny XPAT/XHDR commands for fields not in overview.fmt. INN indexes only what is in overview.fmt. If you disable this option, inn will perform a search through its overview information. For large groups and non-indexed headers simple lookups can take minutes eating up system resources! It's best to leave this check always on.DNSLookups: Wheater to enable reverse DNS lookups or not.DenyNoIndexField 1
DropUnknown: Drop unknown clients after X invalid commands. Mostly mail and webservers and such.DNSLookups 1
DisableFile: Touch this file to disable new connection to the server.DropUnknown 10
DisableText: And the text to display to the client when the DisableFile is there.DisableFile closed
NoSuchArticleRetries: Sometimes diablo reports 'no such article' while the article is there. This option specifies how many retries we should do before returning no such article to the client.DisableText 500 Sorry, temporarily network issues, try again later.
CoreBind: Bind each nntpswitch process to a separate cpu core. For each new connection a cpu core is choosen from the pool. Normally you don't need this option.NoSuchArticleRetries 5
CoreBind 0
LocalDreader
LocalDreader: Tell nntpswitch you have a local dreader listening on some other port on the localhost. This server should be listed first with no groups (!*). This option skips header permission checks to save bandwidth between dreaders and spool servers.LocalDreader 0