]> jfr.im git - irc/srvx.git/blame - srvx.conf.example
Avoid buffer overflow with 64-bit long.
[irc/srvx.git] / srvx.conf.example
CommitLineData
222e1b00
E
1// services configuration file (example)
2/* It allows two kinds of comments. Whitespaces between tokens are
3 * ignored. All strings (even if they're just numbers) MUST be
4 * enclosed in double quotes. There must be a semicolon after every
5 * key/value pair.
6 */
7
8// The "uplinks" section describes what servers we can possibly link
9// to. Each subsection describes one server.
10"uplinks" {
11 "private-network" {
12 // IP address and port the server listens on
13 "address" "10.0.0.3";
14 "port" "6660";
15 // What password should we send when we connect?
16 "password" "passwordtoconnect";
17 // What password should we require our peer to send?
18 // (If it is blank, we do not require a specific password.)
19 "their_password" "passwordtorequire";
20 "enabled" "1";
21 // How many times should we try to connect before giving up?
22 "max_tries" "3";
23 // What IP should we bind to?
24 // If you do not specify bind_address, the default is used.
25 // "bind_address" "192.168.0.10"; // use this ip to link
26 };
27
28 /* unused-uplink is just an example to show you how you can
29 * define more than one uplink (and how you can disable one or
30 * more of them.) */
31 "unused-uplink" {
32 "address" "10.0.0.4";
33 "port" "6660";
34 "password" "passwordtoconnect";
35 "their_password" "passwordtorequire";
36 // If "enabled" is 0, we will not try to use this uplink.
37 "enabled" "0";
38 "max_tries" "3";
39 };
40};
41
42// The "services" section configures the services that make up srvx.
43"services" {
44 "nickserv" {
45 "nick" "NickServ";
f10cc887 46 // What user modes do you want this service to have? Please keep in
47 // mind which ircd software you are using here, and that all of the
48 // services need to be at least +o.
49 // "modes" "+iok";
8b769be4
MP
50 // If you want to by have *@* as the default hostmask for all
51 // new accounts, set default_hostmask. This is discouraged
52 // for security reasons.
222e1b00
E
53 // "default_hostmask" "1";
54 // do we warn users when someone new auths to their account?
55 "warn_clone_auth" "1";
56 // what is the default maxlogins value?
57 "default_maxlogins" "2";
58 // what is the absolute maxlogins value?
59 "hard_maxlogins" "10";
d670d26a
MP
60 // Which mode should we use for account timestamps?
61 "account_timestamp_mode" "ignore";
222e1b00
E
62 // This names a file that contains easily guessed passwords.
63 // It always contains "password", "<password>" and the user's
64 // account name.
65 "dict_file" "/usr/share/dict/words";
66 // Minimum number of various types of characters permitted in
67 // a password.
68 "password_min_length" "4";
69 "password_min_digits" "1";
70 "password_min_upper" "0";
71 "password_min_lower" "0";
72 // What should valid account and nicks look like?
73 // If valid_nick_regex is omitted, valid_account_regex is used
74 // for both nicks and accounts.
75 // These look funny because "[][-]" is the only way to write the
76 // character class containing the characters ']', '[' and '-'.
77 "valid_account_regex" "^[][_a-z^`'{}|-][][_a-z0-9^`'{}|-]*$";
78 "valid_nick_regex" "^[-_a-z][-_a-z0-9]*$";
79
80 // Should nick ownership be disabled?
81 "disable_nicks" "0";
82 // One account may only own this many nicks.
83 "nicks_per_account" "4";
84 // Send a warning when someone uses a registered nick?
85 "warn_nick_owned" "0";
86 // What to do when someone uses the NickServ "reclaim" command?
87 // This can be one of "none", "warn", "svsnick", or "kill", but
88 // stock ircu does not support svsnick -- you need Bahamut or a
89 // patch for ircu. no, don't ask srvx developers for the patch.
90 "reclaim_action" "none";
91 // What (else) to do when someone uses a registered nick?
92 // This can be anything "reclaim_action" can be, but it makes
93 // more sense to use the "warn_nick_owned" instead of "warn".
94 "auto_reclaim_action" "none";
95 // How long to wait before doing the auto_reclaim_action?
96 // This is ignored if "auto_reclaim_action" is "none".
97 "auto_reclaim_delay" "0";
98
99 // access control for who can change account flags
100 "flag_levels" {
101 "g" "800";
102 "lc_h" "800"; // specifically lower case h
103 "uc_H" "800"; // .. and upper case H
104 "S" "999";
105 "b" "1";
106 };
107 // and for who can change epithets for staff
108 "set_epithet_level" "800";
109 // what opserv access level do you need to set somebody else's level?
110 "modoper_level" "850";
111
112 // how often should accounts be expired?
113 "account_expire_freq" "1d";
114 // how long until an account with access to any channel(s) expires?
115 "account_expire_delay" "35d";
116 // how long until an account with no access to any channels expires?
117 "nochan_account_expire_delay" "14d";
93e4294c
T
118 // how long must an account be inactive so it can be ounregistered without force?
119 "ounregister_inactive" "1M";
120 // which flags on an account require the ounregister to be used with force?
121 "ounregister_flags" "ShgsfnHbu";
222e1b00
E
122 /* "require_qualified" has been removed. It is now
123 * integrated into the modcmd command authorization
124 * and dispatch mechanism. "/msg OpServ help modcmd"
125 * for details.
126 */
127 // If somebody keeps guessing passwords incorrectly, do we gag them?
128 "autogag_enabled" "1";
129 "autogag_duration" "30m";
130 "auth_policer" {
131 "size" "5";
132 "drain-rate" "0.05";
133 };
134 // How to integrate with email cookies?
135 "email_enabled" "0"; // if set, /mail/enable MUST be set too
136 "email_required" "0"; // ignored unless email_enabled is non-zero
137 "cookie_timeout" "1d"; // how long before we expire cookies?
138 "accounts_per_email" "1"; // you may want to increase this; or not
139 "email_search_level" "600"; // minimum OpServ level to search based on email address
140 "email_visible_level" "800"; // minimum OpServ level to see somebody's email address
222e1b00
E
141 };
142
143 "opserv" {
144 "nick" "OpServ";
f10cc887 145 // What user modes do you want this service to have? Please keep in
146 // mind which ircd software you are using here, and that all of the
147 // services need to be at least +o.
148 // "modes" "+iok";
b1329b97 149 // should use of this service be limited to global opers?
04565ba3 150 "privileged" "1";
b1329b97
MP
151 // fullname for service
152 "description" "Oper Service Bot";
153 // hostname for service; only used if "description" is also set
154 "hostname" "dances-all-night-with.srvx.net";
222e1b00
E
155 // what channel should opserv send debug output to?
156 "debug_channel" "#opserv";
157 "debug_channel_modes" "+tinms";
158 // where to send general alerts (e.g. flood alerts)?
159 "alert_channel" "#ircops";
160 "alert_channel_modes" "+tns";
161 // who to tell about staff auths?
162 "staff_auth_channel" "#opserv";
163 "staff_auth_channel_modes" "+tinms";
164 // how many clones to allow from an untrusted host?
165 "untrusted_max" "4";
166 // how long of a g-line should be issued if the max hosts is exceeded?
167 "clone_gline_duration" "1h";
168 // how long to g-line for ?block (or, by default, for ?trace gline)?
169 "block_gline_duration" "1h";
170 // how long to keep an illegal channel locked down (seconds)?
171 "purge_lock_delay" "60";
172 // channel join flood policer params?
173 "join_policer" {
174 "size" "20";
175 "drain-rate" "1";
176 };
177 // automatically moderate join flooded channels?
178 "join_flood_moderate" "1";
179 // Don't moderate and warn channels unless there are more than
180 // join_flood_moderate_threshold users in the channel. the
181 // value 0 will disable the threshold.
182 "join_flood_moderate_threshold" "50";
183 // new user flood policer params
184 "new_user_policer" {
185 "size" "200";
186 "drain-rate" "3";
187 };
222e1b00
E
188 };
189
190 "chanserv" {
191 // You may disable a service by removing its "nick" config item.
192 // That means: SERVICES WILL ONLY WORK IF YOU DEFINE THEIR NICK.
193 // (This is changed relative srvx-1.0.x, which would use default
194 // unless you specified ".disabled".)
195 "nick" "ChanServ";
f10cc887 196 // What user modes do you want this service to have? Please keep in
197 // mind which ircd software you are using here, and that all of the
198 // services need to be at least +o.
199 // "modes" "+iok";
e80daf74 200 // Does your ircd have off-channel services support? Does it have
201 // a registered channel mode? Does it support services opping themselves?
202 // Bahamut has these things; ircu2.10.11 does not.
203 // This setting takes three numerical values:
204 // 0 = off
205 // 1 = use a registered channel mode, have services op themselves
206 // 2 = all of the above, and a channel setting to have ChanServ not
207 // idle in the channel
208 "off_channel" "0";
222e1b00
E
209 // how long should a person be unseen before resending infoline?
210 "info_delay" "120";
211 // maximum greeting length
9c6580ff 212 "max_greetlen" "200";
222e1b00
E
213 // maximum users in a channel userlist
214 "max_chan_users" "512";
215 // maximum bans on a channel banlist
216 "max_chan_bans" "512";
bb587381
MP
217 // maximum length of a user's infoline
218 "max_userinfo_length" "400";
222e1b00
E
219 // If DynLimit is on and there are N users in the channel, ChanServ will
220 // try to keep the limit at N+<adjust_threshold>.
221 "adjust_threshold" "15";
222 // .. but ChanServ will only increment or decrement the limit this often.
223 "adjust_delay" "30";
224 // How often to look for channels that have expired?
225 "chan_expire_freq" "3d";
226 // How long is a channel unvisited (by masters or above) before it can be expired?
227 "chan_expire_delay" "30d";
2e71baed
T
228 // How often to look for dnrs that have expired?
229 "dnr_expire_freq" "1h";
222e1b00 230 // what !set options should we show when user calls "!set" with no arguments?
f1d80079 231 "set_shows" ("DefaultTopic", "TopicMask", "Greeting", "UserGreeting", "Modes", "PubCmd", "InviteMe", "EnfModes", "EnfTopic", "TopicSnarf", "UserInfo", "GiveVoice", "GiveOps", "EnfOps", "Setters", "CtcpUsers", "CtcpReaction", "Protect", "Toys", "DynLimit", "NoDelete");
222e1b00
E
232
233 // A list of !8ball responses
234 "8ball" ("Not a chance.",
235 "In your dreams.",
236 "Absolutely!",
237 "Could be, could be.");
238 // channel(s) that support helpers must be in to be helping
239 // if this is a list, any one by itself will do
240 "support_channel" ("#support", "#registration");
241 // maximum number of channels owned by one account before FORCE is required
242 "max_owned" "5";
243 // how long between automatic topic refreshes with TopicRefresh 0
244 "refresh_period" "3h";
245 // what should !access say for various staff?
246 "irc_operator_epithet" "a megalomaniacal power hungry tyrant";
247 "network_helper_epithet" "a wannabe tyrant";
248 "support_helper_epithet" "a wannabe tyrant";
249 // what should a newly registered channel get as its modes?
250 "default_modes" "+nt";
251 // minimum opserv access to set, clear or override nodelete setting?
252 "nodelete_level" "1";
565b871f
MP
253 // how long before a new channel owner can give ownership away?
254 "giveownership_timeout" "1w";
222e1b00
E
255 };
256
257 "global" {
258 "nick" "Global";
f10cc887 259 // What user modes do you want this service to have? Please keep in
260 // mind which ircd software you are using here, and that all of the
261 // services need to be at least +o.
262 // "modes" "+iok";
222e1b00
E
263 // should users get community announcements by default or not?
264 "announcements_default" "on";
265 };
266};
267
268// The modules section gives configuration information to optional modules.
269"modules" {
270 "helpserv" {
271 // The description/fullname field
272 "description" "Help Queue Manager";
273 // HelpServ bots log all of their requests to this file, with
274 // details on when they were opened, closed, their contents,
275 // helper, etc. The file is written in saxdb format for easy
276 // parsing by external programs. Please note that you cannot
277 // use ?set to change this value while srvx is running.
278 "reqlogfile" "helpservreq.log";
279 // How long should a helpserv be inactive (no requests assigned)
280 // before it can be unregistered by the expire command?
281 "expiration" "60d";
282 };
283 "sockcheck" {
284 "max_sockets" "64"; // allow 64 concurrent clients to be checked
285 "max_read" "1024"; // don't read more than 1024 bytes from any client
286 "gline_duration" "1h"; // issue G-lines lasting one hour
287 "max_cache_age" "60"; // only cache results for 60 seconds
007cc230 288 // "bind_address" "192.168.0.10"; // do proxy tests from this address
222e1b00
E
289 };
290 "snoop" {
291 // Where to send snoop messages?
292 "channel" "#wherever";
293 // Which bot?
294 "bot" "OpServ";
295 // Show new users and joins from net joins? (off by default)
296 "show_bursts" "0";
297 };
298 "memoserv" {
299 "bot" "NickServ";
300 "message_expiry" "30d"; // age when messages are deleted; set
301 // to 0 to disable message expiration
302 };
e0520732 303 "qserver" {
007cc230 304 "bind_address" "127.0.0.1";
e0520732
MP
305 "port" "7702";
306 "password" "hello";
307 };
fd97d015
MP
308 "blacklist" {
309 // File containing blacklisted client addresses.
310 // "file" "blacklist.txt";
311 // Each line in the file should start with an IP or hostname.
312 // If there is whitespace and a message after that, the
313 // message will override this one:
314 "file_reason" "client is blacklisted";
315 // How long should a blacklist G-line last?
316 "gline_duration" "1h";
e812537c
T
317 // Bot used to send debug notices
318 "debug_bot" "OpServ";
319 // To which channel should debug output be sent?
320 "debug_channel" "#opserv";
321 "debug_channel_modes" "+tinms";
94ff9515
MP
322 // If you want to use DNS blacklists, add them here:
323 "dnsbl" {
324 // This DNSBL zone does not exist - you'll have to pick your own.
325 "dnsbl.example.org" {
e812537c
T
326 // Send a notice instead of glining blacklisted ips
327 "debug" "1";
94ff9515
MP
328 "description" "Example DNSBL entry";
329 "reason" "busted by a dns blacklist";
330 "duration" "1h";
331 // You can stick the client's IP in the G-line message.
332 "reason_2" "Example DNSBL reported %ip%'s address as 127.0.0.2";
333 // .. or the contents of a DNS TXT.
334 "reason_3" "%txt%";
335 };
336 };
337 };
338 "sar" {
339 // You generally will not want to override these defaults.
340 // "resolv_conf" "/etc/resolv.conf";
341 // "services" "/etc/services";
342 // "bind_address" "0.0.0.0";
343 // "bind_port" "0";
344 // The defaults for these are derived from the system config files (above).
345 // "domain" "example.org";
346 // "timeout" "3"; // base timeout for a DNS reply
347 // "retries" "3"; // number of times to retry on different servers or longer timeouts
348 // "ndots" "1"; // number of dots needed in a hostname to bypass search path
349 // "edns0" "0"; // if set, enable EDNS0 extended message sizes
350 // "search" ("example.org", "example.net");
351 // "nameservers" ("127.0.0.1");
fd97d015 352 };
222e1b00
E
353};
354
355"policers" {
356 "commands-luser" {
357 "size" "5";
358 "drain-rate" "0.5";
359 };
360};
361
362"rlimits" {
363 "data" "50M";
364 "stack" "6M";
365 "vmem" "100M";
366};
367
368"server" {
369 "hostname" "localhost.domain";
370 "description" "Network Services";
371 "network" "GenericNET";
372 "hidden_host" "users.Generic.NET"; // set this if you enabled ircd/Undernet's +x mode
373 /* hidden_host should match the F:HIDDEN_HOST: line in your ircu's ircd.conf;
374 * srvx does not set the host suffix for users, but must know it when making
375 * things like bans, where it should not show the user's real hostname. */
376 "numeric" "10"; // hint: If you get collisions on link, CHANGE THIS.
377 "max_users" "256"; // You can save a little memory by setting this to a lower value.
378 "force_n2k" "1"; // Use extended (5-digit) numnick for self, even if 3 are possible.
379 "ping_freq" "60";
380 "ping_timeout" "90";
381 "max_cycles" "30"; // max uplink cycles before giving up
382 // Admin information is traditionally: location, location, email
383 "admin" ("IRC Network", "Gotham City, GO", "Mr Commissioner <james.gordon@police.gov>");
83a576f5 384 /* the following two settings are for ircu's HEAD_IN_SAND features, and are equivelent to
385 * the F: lines in ircu's ircd.conf. both can be disabled by commenting them out. */
386 "his_servername" "*.Generic.NET"; // hidden server name, shown in remote /whois requests
387 "his_servercomment" "The Generic, Boring IRC Network";
222e1b00
E
388};
389
390// controlling how services (mostly NickServ) send mail
391"mail" {
392 // These options are the defaults.
393 "enable" "0";
394 "mailer" "/usr/sbin/sendmail";
395 "from_address" "admin@poorly.configured.server";
396 // These are not :>
397 "extra_headers" ("X-Ereet-Services: srvx r reet");
398 "body_prefix_first" ("Welcome to our network. This prefix is used whenever srvx thinks this may be the first time we send email to your address.");
399 "body_prefix" ("This goes before the mail text.", "Each string here is treated as a separate \"paragraph\" for line wrapping.");
400 "body_suffix_first" ("We care a lot about spam. If you did not request this email, bitch and moan loudly at our opers, and tell our ISP to gank our connection.");
401 "body_suffix" ("PLEASE DO NOT BE ALARMED. CALMLY BOARD THE AIRCRAFT, STRAP YOUR ARMS ACROSS YOUR BODY, AND JUMP THE HELL OUT OF THE PLANE.", "Yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaatta!");
0466da57
MP
402 // If you are using the smtp mail back-end, you may need to set these:
403 "smtp_server" "localhost";
404 "smtp_service" "smtp";
405 // "smtp_myname" "localhost.domain";
222e1b00
E
406};
407
408// New section in srvx-1.2 to control database locations, etc.
409// If you leave this section out, each database will be in its own file,
410// and they will be written out every half hour.
411"dbs" {
412 // This just illustrates how you can jam every database into one huge ("mondo") file.
413 "ChanServ" { "mondo_section" "ChanServ"; };
414 "gline" { "mondo_section" "gline"; };
415 "Global" { "mondo_section" "Global"; };
416 "HelpServ" { "mondo_section" "HelpServ"; };
417 "modcmd" { "mondo_section" "modcmd"; };
418 "NickServ" { "mondo_section" "NickServ"; };
419 "OpServ" { "mondo_section" "OpServ"; };
420 "sendmail" { "mondo_section" "sendmail"; };
421
422 // These are the options if you want a database to be in its own file.
423 "mondo" {
424 // Where to put it?
425 "filename" "srvx.db";
426 // How often should it be saved?
427 // (You can disable automatic saves by setting this to 0.)
428 "frequency" "30m";
429 };
430};
431
432// New section in srvx-1.2 to control log destinations.
433// If you leave this section out, each service (technically, each log
434// facility) will be in its own file, just like before.
435"logs" {
436 // Two kinds of items exist in this section.
437
438 // One is a facility configuration subsection. These have the
439 // name of a log facility (one of "ChanServ", "Global",
440 // "HelpServ", "NickServ", "OpServ", "ProxyCheck", or "srvx") and
441 // the value is a subsection. The "srvx" log facility is a
442 // catch-all/fall-back facility.
443 "srvx" {
444 // The "max_age" option says how long to keep log audit entries.
445 "max_age" "10m";
446 // The "max_count" option says how many log audit entries to keep.
447 "max_count" "1024";
448 // Audit (command tracking) entries are discarded if they exceed
449 // either limit: for example, if entry 500 is 10 minutes old, it
450 // will be discarded next time any audit command is logged.
451 };
452
453 // The other kind of item is a target list. The name of each is a
454 // description of facility-and-severity combinations, and the value
455 // is a string (or list of strings) that describe where matching
456 // events should be logged. As a special case, the facility * will
457 // specify how to log events regardless of their true facility, and
458 // the severity * will match all severities for a facility.
459 // Log targets use a psuedo-URI syntax: one of "file:filename",
460 // "std:[out|err|n]" where n is a valid file descriptor, or
461 // "irc:#channel" (nicknames or server masks can be used instead
462 // of channel names, but should be used with care).
463 // The severity is one of "replay", "debug", "command", "info",
464 // "override", "staff", "warning", "error", or "fatal".
465 // WARNING: If any severity except "replay" for a facility is left
466 // unspecified, it will use the default target (for example,
467 // "file:chanserv.log"). For "replay" severity, you must ALWAYS
468 // list a target to log it -- this is because it is very rarely
469 // useful.
470 "*.*" ("std:out", "file:everything.log"); // does NOT suppress any defaults
471 "*.override,staff" "irc:#big-brother"; // report all uses of staff commands
472 "ChanServ.*" "file:chanserv.log"; // duplicates the default behavior
473 "ProxyCheck.*" (); // stop it from logging anything
474};