-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.cfg
317 lines (276 loc) · 10.9 KB
/
config.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# nntp-rs configuration file.
server {
# Address/port to listen on.
# ':port' is ipv4+ipv6, '*:port' is ipv4-only, '[::]:port' is ipv6-only.
listen :1119;
# User and group to setuid/setgid to after start.
user news;
group news;
# Auxillary groups override (default: derived from username).
# aux-groups = _prometheus;
# Runtime to use. 'threaded' with 'blocking_io threadpool' is the default.
#runtime threaded {
# #blocking_io threadpool;
#}
#runtime multisingle {
#threads 12;
#threads_per_core 2;
#cores 0,2,4-7
#}
# hostname sets the system hostname for banners, logging, etc.
# also sets the default for xrefhost and path-identity.
#hostname nntp.example.com;
# path-identity is the path element that is inserted in front of the
# Path: header of all articles being received. You can set multiple
# path-identity elements; each one will be inserted in front if the
# existing path elements.
#
# It's also valid to specify `path-identity pathelem1!pathelem2` which
# is the exact same as `path-identity pathelem2, pathelem2`.
#path-identity nntp.example.com;
# commonpath is like path-identity, but it will only be inserted if it is not
# present in the path yet. defining multiple elements here makes no sense.
#commonpath common.example.com;
}
# Paths to the default directories.
# All settings here ('config', 'spool' etc) set internal variables with
# that name that can be interpolated in pathnames.
paths {
# Configuration files.
config /etc/news;
# Articles storage ("spool directory").
spool /var/spool/news;
# Logfiles.
log /var/log/news;
# Database (history file, active file, metrics).
db /var/lib/news;
# Runtime ephemeral files (pid file, unix socket).
run /run/news;
# Outgoing queue.
queue /var/spool/news/outgoing;
}
# Compatibility with diablo format configuration files. These files
# will be read in addition to the "spool" and "newsfeeds" sections
# of this configuration file.
#compat {
# # Diablo format dnewsfeeds file.
# dnewsfeeds "${config}/dnewsfeeds";
#
# # Diablo format dspool.ctl file.
# dspool_ctl "${config}/dspool.ctl";
#}
# All relative paths in 'log' are relative to paths::log.
# Log files usually live in ${log}, metrics in ${db}.
#
# Log destinations for 'general' and 'incoming' can be "stdout", "stderr",
# "syslog", or a file. They can also contain the variable "${date}" which
# expands to YYYYMMDD in local time, so the logfile will auto-rotate.
log {
# General log.
general syslog;
# Incoming log; 1 line per incoming article.
incoming "${log}/incoming.log.${date}";
# Metrics. Mainly used to persist the values over restarts/reboots, but you
# can read them directly. Format is JSON.
#metrics "${db}/metrics.json";
# Prometheus format metrics. You can export these for example using
# prometheus' node_exporter's textfile collector. Since the server
# probably runs as the 'news' user, it may not be able to write to
# the textfile_collector directory directly. In that case, just leave
# nntp.prom in ${db}, and create a symlink to it from that directory.
#prometheus "${db}/nntp.prom";
}
# Active file configuration.
#
# Optional for peering/feeder servers. You need to configure this if the server
# does article-numbering (sets the Xref: header) or has reader-support enabled.
#active {
# # Backend to use, and backend-specific settings.
# # Right now we only implement "diablo".
# backend diablo {
# file "${db}/dactive.kp";
# }
#
# # Article numbering.
# #
# # Article numbers are host or site local. Every newsserver that allows
# # clients to read newsgroups has to supply each article with a unique,
# # strictly increasing article-number for each group it is posted in.
# # Those article-numbers are used or listed with NNTP commands like "group"
# # and "article/head/body" etc. They are also visible in the "Xref:" header.
# # That's why we use "xref" as a name of this section.
# xref {
# # Mode to run in, either `primary` or `replica`. A primary server
# # keeps count and adds (or replaces) Xref: headers. A replica copies
# # the article-numbers from the Xref: header and uses that to keep
# # the counters in the `active` file up to date.
# mode primary;
#
# # The hostname to use (or check, in replica mode) in the Xref header.
# # Defaults to server::hostname.
# #hostname some.xrefhostname.example;
# }
#
# # Synchronize the active file with a remote server using NNTP.
# # We execute "LIST active" and "LIST newsgroups", then compare
# # that with the local active file and apply the differences.
# #
# # Multiple "sync" sections are allowed.
# sync {
# # Server to sync from.
# server nzactive.xs4all.net;
#
# # Limit the groups we sync.
# groups *;
#
# # If set, remove local groups that are not present on the sync-server.
# remove;
#
# # Also sync descriptions (LIST newsgroups).
# descriptions;
# }
#}
# The 'history' file is a key/value database that contains an entry for
# every article in the spool. The key is the article's message-id, the
# value contains the time the articles was received, a few flags, and
# the location of the article in the spool.
history {
# Location of the history database.
file "${db}/dhistory";
# Which backend to use, or, which format.
backend diablo;
# For very busy servers it might be useful to keep (part of) the
# history database in memory permanently. Settings are "index", "all".
#mlock all;
# The maximum number of parallel accesses to the history database.
threads 32;
# We also keep entries for articles that have already expired from
# the spool, to prevent receiving duplicates.
remember 7d;
}
# The spool section defines where the articles are stored.
# This is called 'the spool' or 'the news spool' or 'the article spool'.
#
# You can define it directly in this config file, or if it's
# large/complicated split it off into its own file, then include it:
#
# spool {
# include spool.cfg;
# }
#
spool {
# Spool definitions are numbered 0..99. Usually you have
# a filesystem dedicated to a spool, and you can have multiple
# filesystems/spools (often one per disk or volume).
spool 0 {
# Format of the data in the spool.
backend diablo;
# Location. If you have a single spool then "${spool}/articles"
# is a good choice. If you have multiple spools best-practice is
# to use "P.xx" as the directory name where "xx" is the number
# of the spool.
#path "${spool}/P.00";
path "${spool}/articles";
# Minimum amount of space that must be free in this spool. The
# Diablo backend starts an auto-expire (FIFO cleanup thread)
# as soon as the amount of space dips under this value, and it
# then deletes the oldest articles until minfree * 1.10 space
# is available again.
#minfree 10G;
# Maxsize sets a maximum size, that is maintained automatically.
# NOTE: this is the size of the _filesystem_, not of just the
# articles in the spool. So if you store anything else big in
# the same filesytem, the auto-expire might delete the entire
# spool trying to free space. Don't do that.
#maxsize 50G;
# Keeptime is the maximum amount of time the articles are kept.
# Articles older than keeptime get deleted automatically.
keeptime 90d;
# Weight of this spool in a 'spoolgroup'. Every article received is
# matched to a spoolgroup, and then written to a spool in that group.
# The weight defines how many articles, relative-wise, are written to
# this spool. For example, with spools 0, 1, 2 and weights 10, 10, 20,
# spool 0 and 1 each get 25% of the articles and spool 2 gets 50%.
# Weight defaults to the size of the filesystem containing the spool in GB.
#weight 100;
# Diablo type spools consist of multiple directories containing
# large spoolfiles. This setting defines how often a new directory
# is created. The diablo default is 10 minutes, but that results
# in lots of directories. A few hours to a day is better.
reallocint 1d;
# The maximum size of one spool file. The diablo format history file
# has article offsets stored as a 32 bit number, so this cannot
# exceed 4GiB (a bit less to be safe). The default is 1GB, if you want to
# stay compatible with diablo keep it under 2GB.
#max-file-size 4000M;
}
#
# spool 1 {
# backend diablo;
# path "${spool}/P.01";
# minfree 10G;
# }
#
# spool 2 {
# backend diablo;
# path "${spool}/P.02";
# minfree 10G;
# }
#
# A group of spools together form a spoolgroup. You need at least one spoolgroup.
# When an article is received, it is matched against all spoolgroups and then
# gets assigned to the first matching one.
spoolgroup main {
# Define the spools that are a member of this group.
#spool 0, 1, 2;
spool 0;
# Match the Newsgroups: headers.
groups *;
# Maximum size of an article.
#maxsize 64K;
# Maximum number of groups the article has been crossposted to.
#maxcross 16;
# Hashfeed the message-id of the article has to match.
#hashfeed 1/3;
# Article type matcher.
# none, default, control, cancel, mime, binary, uuencode, base64,
# binhex, yenc, bommanews, multipart, html, ps, partial, pgp, all.
# This works the same as a 'groups' selector, for example:
#arttypes all, !binary.
# If set and the article matches this spoolgroup it gets accepted, then dropped.
#dontstore;
# If set and the article matches this spoolgroup it gets rejected.
#rejectarts;
}
}
# Input filters are applied when an article is received, before it is
# written to the spool or forwarded to other peers.
input-filter {
# Everything that matches the reject filter is rejected.
# You can match and reject on:
# - path_identity
# - groups
# - distributions
# - mincross, maxcross
# - minpath, maxpath
# - minsize, maxsize
# - arttypes
#
# The filter below rejects binary articles posted in non-binary groups.
#
# reject {
# groups *,@*.bina*;
# arttypes binary;
# }
}
# Newsfeeds can be defined directly in the config file, but
# since the configuration of those feeds can get quite large it's
# normally split off into a seperate file (or multiple files).
#
# You can include multiple comma-separated files. Wildcards work too.
newsfeeds {
include newsfeeds.cfg;
# or:
# include newsfeeds.cfg, newsfeeds.d/*;
}
# vim: set ts=4 sw=4 et: