mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-28 17:38:04 -08:00
[general] database = takes SQLite's file as before, or a server's address: postgres://... (pgx) or mysql://... / mysql:DSN (go-sql-driver). The store's SQL is written once; internal/store's dialect gives each engine its forms of what differs: ? placeholders ($1 for PostgreSQL), ids returned by RETURNING or LastInsertId, upserts (ON DUPLICATE KEY UPDATE), INSERT OR IGNORE, GREATEST, booleans, unique violations, column checks for migrations, indexes. The schema is one list with types per engine: names match in any case (NOCASE, an ICU collation made on PostgreSQL, utf8mb4_0900_as_ci), MySQL keeps indexed text in VARCHARs and connects with the SQL mode the store wants (ANSI quotes for "read" and "key", strict, rows matched not changed). Existing SQLite databases are kept as they are. bbs db copy DATABASE copies every table into a new database of any engine, keeping ids (PostgreSQL's sequences set after). Logs and bbs check never show a server's password. Under go test, BBS_TEST_DATABASE puts every test's store on a PostgreSQL or MySQL server (a schema or database each, dropped after): the whole suite passes on PostgreSQL 16 and MySQL 8.4 as on SQLite. The store's own tests check what the engines do differently, and copying from SQLite into each. Also: the FTP tests' readiness probe now waits to be counted out, so the per-address limit test no longer fails at random. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
396 lines
15 KiB
Plaintext
396 lines
15 KiB
Plaintext
;
|
|
; bbs.conf - a BBS for telnet, TN3270 and modem callers
|
|
;
|
|
; bbs -config /etc/bbs/bbs.conf check checks this file
|
|
;
|
|
; Comments (; or #) go on lines of their own. Values may be "quoted" to
|
|
; keep spaces at their ends; in quoted values \r \n \t \e and \xHH are those
|
|
; bytes.
|
|
|
|
[general]
|
|
name = D-Modem BBS
|
|
sysop = Sysop
|
|
;location = Somewhere, Earth
|
|
; the database: SQLite's file, or a PostgreSQL or MySQL server (whose
|
|
; password then lives here: keep this file 0640). bbs db copy moves one
|
|
; into another. See docs/wiki/Databases.md
|
|
database = /var/lib/bbs/bbs.db
|
|
;database = postgres://bbs:PASSWORD@db.example.org/bbs
|
|
;database = mysql://bbs:PASSWORD@db.example.org:3306/bbs
|
|
; syslog (daemon facility), stderr, none, or a file
|
|
log = syslog
|
|
; shown before the login (text, or a file)
|
|
;banner = "Call us at 555-1000, 300 to 33600 bit/s."
|
|
;banner_file = /etc/bbs/banner.txt
|
|
; the message of the day, after the login: motd, then the file (read at
|
|
; each login)
|
|
;motd = "The line is down for maintenance on Sunday."
|
|
;motd_file = /etc/bbs/motd.txt
|
|
; the sysop's screens (display files): logon, newuser, welcome, goodbye and
|
|
; those menus name; NAME.ans (ANSI, CP437), NAME.asc (text), NAME.3270.
|
|
; screens.sample has some to start from
|
|
;screens_dir = /etc/bbs/screens
|
|
; a caller pages the sysop and no sysop is on: tell them this way ({user},
|
|
; {node} and {reason} filled in; no shell). E.g. a push by ntfy.sh:
|
|
;page_command = curl -s -d "{user} on node {node}: {reason}" https://ntfy.sh/my-bbs-pages
|
|
goodbye = Thanks for calling.
|
|
; the logo: a PNG (at most 1000x400), shown as sixel graphics on telnet
|
|
; terminals that have them, and on 3270s (below). Without one, the
|
|
; system's name is drawn in a pixel font
|
|
;logo = /etc/bbs/logo.png
|
|
; 3270 graphics. Box drawing (graphic escape) is used wherever the
|
|
; terminal has it. tn3270_symbols: the logo (the system's name, or
|
|
; tn3270_logo, a PNG, or logo: one color, dark or opaque pixels drawn) loaded as programmed
|
|
; symbols on terminals that take them (IBM PCOMM, HostExplorer; not the
|
|
; x3270 family). tn3270_vector: the logo drawn with vector graphics instead
|
|
; on terminals that have them (PCOMM with host graphics on); experimental
|
|
tn3270_symbols = yes
|
|
tn3270_vector = no
|
|
;tn3270_logo = /etc/bbs/logo.png
|
|
; file areas: where the files are kept (by number, never by their names),
|
|
; the largest file, and what a user may upload a day (sysops: no limit)
|
|
files_dir = /var/lib/bbs/files
|
|
max_file_size = 64M
|
|
upload_quota = 256M
|
|
; callers may make their own accounts (NEW at the login, PF5 on a 3270)
|
|
new_users = yes
|
|
; callers at once, on all listeners together
|
|
max_nodes = 32
|
|
; logins before hanging up, seconds after a wrong one
|
|
attempts = 3
|
|
fail_delay = 3
|
|
; seconds to log in, and for a key once logged in
|
|
login_timeout = 120
|
|
idle_timeout = 600
|
|
; this many failed logins (or new accounts) from one IP address or caller
|
|
; ID within throttle_time seconds turn it away until they age out
|
|
; (0: never). Callers with neither (a modem server's, no caller ID) are
|
|
; not throttled: one would lock out all
|
|
throttle_failures = 10
|
|
throttle_time = 600
|
|
|
|
; A listener:
|
|
; type = telnet a telnet server; with tn3270 = yes (the default),
|
|
; a client that says it is a 3270 (IBM-3278-2-E,
|
|
; IBM-DYNAMIC) gets the 3270 screens
|
|
; raw the caller's bytes as they come, no protocol:
|
|
; app_dmodem's mode = tcp, modemmenu tcp/unix items
|
|
; rlogin RFC 1282, as modemmenu's rlogin items speak it
|
|
; ssh SSH: passwords or users' keys (host_keys, legacy)
|
|
; address = host:port or a unix socket's path (/run/bbs/bbs.sock)
|
|
; via = ... how its callers came, in who's online
|
|
; (telnet, modem, rlogin by type)
|
|
; ansi = auto the terminal's ANSI color: auto asks the terminal
|
|
; (or believes its terminal type), yes, no
|
|
; utf8 = auto UTF-8 both ways: auto by the terminal type (xterm
|
|
; and friends yes; "ansi" BBS terminals no), yes, no
|
|
; sixel = auto the logo as sixel graphics on terminals that say
|
|
; they have them (device attributes); no. auto for
|
|
; telnet, no for raw and rlogin (slow modem lines)
|
|
; petscii = no Commodore 64s and 128s: yes (every caller is one),
|
|
; auto (a caller that is not ANSI is watched while it
|
|
; logs in: a key only a C64 has, or DEL asked for
|
|
; after a name in capitals, makes it PETSCII), no
|
|
; vt = auto ask terminals what they are (answerback, DA1, DA2,
|
|
; XTVERSION; ESC Z for a VT52): DEC line drawing for
|
|
; VTs without UTF-8, bold on monochrome VTs, a VT52's
|
|
; escapes; no: ask nothing
|
|
; rip = auto RIPscrip menus and screens for terminals that answer
|
|
; ESC [ ! (BBS terminals; modern ones are not asked),
|
|
; yes, no
|
|
; max_per_ip = 4 connections at once from one address (loopback
|
|
; and unix sockets: no limit, they are modem servers)
|
|
; header = no yes: a session header comes first, NAME=value lines
|
|
; and an empty line: app_dmodem's DMODEM_* or a
|
|
; modemmenu item's MODEM_* (rate, caller ID, number)
|
|
; header_timeout = 10 seconds for the header
|
|
; trust_user = no yes: the header's MODEM_USER (an rlogin's server
|
|
; user) is logged in without a password. Only where
|
|
; nothing but trusted menus can connect
|
|
; create_users = no yes, with trust_user: a user unknown here gets an
|
|
; account (with no password of its own)
|
|
; socket_mode = 0660 a unix socket's permissions
|
|
; socket_group = ... and its group
|
|
|
|
; telnet and TN3270, for everyone (port 23 needs root or
|
|
; CAP_NET_BIND_SERVICE)
|
|
[listen telnet]
|
|
type = telnet
|
|
address = :2300
|
|
tn3270 = yes
|
|
max_per_ip = 4
|
|
|
|
; app_dmodem's [bbs] profile (mode = tcp, host = 127.0.0.1, port = 2323):
|
|
; modem callers, raw. Keep it to 127.0.0.1
|
|
[listen modem]
|
|
type = raw
|
|
address = 127.0.0.1:2323
|
|
|
|
; SSH: the text BBS, encrypted. Users log in with their BBS password or
|
|
; a key (bbs sshkey add, or their profile); "new" gets the BBS's prompt
|
|
; to sign up. Host keys are made beside the database the first time
|
|
;[listen ssh]
|
|
;type = ssh
|
|
;address = :2222
|
|
;max_per_ip = 4
|
|
;host_keys = /etc/bbs/ssh_host_ed25519_key /etc/bbs/ssh_host_rsa_key
|
|
; old clients only: CBC ciphers and 1024-bit DH too
|
|
;legacy = no
|
|
|
|
; modemmenu's rlogin item: the caller's modemmenu login and password are
|
|
; checked here (the same accounts on both, or the caller logs in again)
|
|
[listen rlogin]
|
|
type = rlogin
|
|
address = 127.0.0.1:2513
|
|
|
|
; modemmenu's unix item with header = yes: modemmenu has logged the caller
|
|
; in, and the BBS believes it. Only modemmenu may connect: the socket's
|
|
; group is Asterisk's (which modemmenu runs as)
|
|
;[listen menu]
|
|
;type = raw
|
|
;address = /run/bbs/menu.sock
|
|
;header = yes
|
|
;trust_user = yes
|
|
;create_users = yes
|
|
;socket_mode = 0660
|
|
;socket_group = asterisk
|
|
|
|
; The HTTP API (REST, server-sent events, and WebSockets in JSON and
|
|
; protobuf): see docs/wiki/HTTP-API.md. Tokens: POST /api/v1/login, or
|
|
; bbs token add USER -scope read,post. Without this section there is none
|
|
;[http]
|
|
;address = :8443
|
|
; TLS is the default; tls = no only on 127.0.0.1 behind a proxy that has it
|
|
;cert_file = /etc/bbs/tls/cert.pem
|
|
;key_file = /etc/bbs/tls/key.pem
|
|
; anonymous callers may see /system and /who
|
|
;anonymous = yes
|
|
; one browser origin allowed to call it (no *)
|
|
;cors = https://www.example.org
|
|
; Prometheus metrics, on an address of their own (keep it private)
|
|
;metrics = 127.0.0.1:9100
|
|
;max_per_ip = 20
|
|
; requests a second per token (or per IP without one), and the burst
|
|
;rate = 10
|
|
;burst = 20
|
|
; how long a /login session lasts
|
|
;session_hours = 24
|
|
; the web terminal at /terminal: the BBS in a browser (xterm.js, built in)
|
|
;terminal = yes
|
|
|
|
; Access levels: a user's level (0-255) gets what the [level] at or
|
|
; below it says; areas, doors and menus may require a level and flags
|
|
; (bbs area require, require = in [door] and [menu]). See
|
|
; docs/wiki/Access-Levels.md. Without any, nothing is limited
|
|
;[general]: new_user_level = 20, validated_level = 20
|
|
;[level 10]
|
|
;name = New user
|
|
;time = 30
|
|
;downloads = 2
|
|
;post = no
|
|
;mail = no
|
|
;chat = no
|
|
;[level 20]
|
|
;name = Member
|
|
;time = 120
|
|
;downloads = 20
|
|
|
|
; The FTP server for the file areas: users log in with their BBS name and
|
|
; password; each file area is a directory. bbs filearea add NAME makes
|
|
; one. Without this section there is no FTP server
|
|
;[ftp]
|
|
;address = :2121
|
|
; passive data connections: open these in the firewall too
|
|
;passive_ports = 50000-50100
|
|
; behind NAT: the public IP address passive replies give
|
|
;public_host = 203.0.113.7
|
|
; required: explicit FTPS (AUTH TLS before USER); implicit: TLS from the
|
|
; first byte; optional or no: passwords may cross in the clear
|
|
;tls = required
|
|
;cert_file = /etc/bbs/cert.pem
|
|
;key_file = /etc/bbs/key.pem
|
|
; anonymous and ftp may log in to download
|
|
;anonymous = no
|
|
;max_clients = 32
|
|
;max_per_ip = 4
|
|
;idle_timeout = 300
|
|
; the address users are told, in the file areas
|
|
;advertise = bbs.example.org:2121
|
|
|
|
; Newsgroups: a message area with a newsgroup name (bbs area newsgroup
|
|
; General bbs.general) is a newsgroup, served by NNTP to newsreaders and
|
|
; kept in step with peer news servers. [news] names this site in Path and
|
|
; Message-IDs; it defaults to the machine's name
|
|
;[news]
|
|
;hostname = news.example.org
|
|
;domain = news.example.org
|
|
;organization = D-Modem BBS
|
|
; the largest article taken (from readers and peers)
|
|
;max_article = 64K
|
|
|
|
; The NNTP server. Without this section there is none (peers still sync)
|
|
;[nntp]
|
|
;address = :1119
|
|
; no, optional (STARTTLS), required (no AUTHINFO before STARTTLS), implicit
|
|
; (TLS from the first byte, NNTPS: usually port 563)
|
|
;tls = required
|
|
;cert_file = /etc/bbs/cert.pem
|
|
;key_file = /etc/bbs/key.pem
|
|
; read = anyone, or users: AUTHINFO first. post = yes: logged-in users post
|
|
;read = anyone
|
|
;post = yes
|
|
;max_clients = 32
|
|
;max_per_ip = 8
|
|
;idle_timeout = 600
|
|
|
|
; A peer news server, one section each. pull: its new articles in our
|
|
; newsgroups are fetched (GROUP, OVER, ARTICLE); push: our new articles are
|
|
; offered (IHAVE, or POST if it refuses IHAVE). accept_from: the addresses
|
|
; it may send us articles from by IHAVE (nothing else may)
|
|
;[peer upstream]
|
|
;address = news.example.net:119
|
|
;tls = starttls
|
|
;ca_file = /etc/bbs/peer-ca.pem
|
|
;username = bbs
|
|
;password = secret
|
|
;groups = bbs.*,!bbs.test
|
|
;pull = yes
|
|
;push = yes
|
|
;interval = 600
|
|
;max_per_run = 1000
|
|
; on first contact, how many of each group's latest articles to fetch
|
|
;initial = 100
|
|
;accept_from = news.example.net
|
|
|
|
; FidoNet (or another FTN network). bbs area echo General FSX_GEN makes an
|
|
; area an echo; mail to Name@zone:net/node is netmail. Without this section
|
|
; the BBS is not on FidoNet
|
|
;[fido]
|
|
; our address, then any AKAs
|
|
;address = 21:1/999
|
|
;origin = D-Modem BBS, by phone and telnet
|
|
; inbound, outbound and bad packets go under it
|
|
;dir = /var/lib/bbs/fido
|
|
; what messages are written in: cp437 (what FidoNet reads) or utf-8
|
|
;charset = cp437
|
|
;max_message = 64K
|
|
|
|
; binkp: answer the links' calls. Without it, links are only called
|
|
;[binkp]
|
|
;address = :24554
|
|
;max_clients = 16
|
|
;max_per_ip = 4
|
|
|
|
; A system we exchange mail with, one section each
|
|
;[link hub]
|
|
;address = 21:1/100
|
|
; to call it (port 24554 if none); without a host it calls us
|
|
;host = hub.example.net:24554
|
|
; the session password (CRAM-MD5); and the packets', up to 8 characters
|
|
;password = secret
|
|
;packet_password =
|
|
; it may be sent in the clear to a mailer without CRAM-MD5
|
|
;plain_password = no
|
|
; the echoes exchanged with it: a wildmat of tags
|
|
;echoes = FSX_*
|
|
; netmail for systems that are not links goes by it (one link at most)
|
|
;route = yes
|
|
; zip: ARCmail bundles; none: bare packets
|
|
;packer = zip
|
|
; call it every this many seconds, mail or not (0: only with mail)
|
|
;poll = 3600
|
|
; which of our addresses it knows us by (default: ours in its zone)
|
|
;aka = 21:1/999
|
|
|
|
; Doors: programs callers on the text BBS play (D on the main menu). The
|
|
; BBS writes drop files (DOOR.SYS, DORINFO1.DEF, DOOR32.SYS, CHAIN.TXT) into
|
|
; the node's own directory and joins the caller's line to the door until it
|
|
; ends, the caller hangs up, or the time is up. One section each
|
|
;
|
|
;
|
|
; A DOS door, in dosemu2 in Docker (make doors-image). F: is /srv/doors,
|
|
; G: the node's drop files; the caller is on COM1 behind a FOSSIL. The BBS
|
|
; must run as a user in the docker group, not root: --user {uid}:{gid}
|
|
; runs the door as that user, so that it can write the node's directory
|
|
;[door lord]
|
|
;description = Legend of the Red Dragon
|
|
;command = docker run --rm -i --network none --name bbs-door{node} --user {uid}:{gid} -v /srv/doors:/doors -v {dir}:/node bbs-dosemu2 'F:\LORD' 'START.BAT {node}'
|
|
; the node's directory ({node} its number): mounted as /node above
|
|
;dir = /var/lib/bbs/doors/node{node}
|
|
;drop_files = door.sys dorinfo1.def door32.sys chain.txt
|
|
; cp437: shown as UTF-8 to UTF-8 terminals; utf-8; raw: as it comes
|
|
;charset = cp437
|
|
; minutes a visit
|
|
;time_limit = 60
|
|
;sysop_only = no
|
|
; yes: one caller at a time (a door that is not multi-node)
|
|
;single = no
|
|
; after the door: make sure its container is gone
|
|
;cleanup = docker rm -f bbs-door{node}
|
|
;
|
|
; A program for Linux: on a pseudo-terminal, in UTF-8
|
|
;[door adventure]
|
|
;command = /usr/games/adventure
|
|
;charset = utf-8
|
|
;pty = yes
|
|
;door32_comm = local
|
|
|
|
; finger: who is on ("finger @host"), and who a user is ("finger name@host").
|
|
; Port 79 needs CAP_NET_BIND_SERVICE (bbs.service.sample)
|
|
;[finger]
|
|
;address = :79
|
|
;online = yes
|
|
;users = yes
|
|
|
|
; gopher: about the system, who is on, and what areas the sysop opens: no
|
|
; login, so anyone sees them. Port 70 needs CAP_NET_BIND_SERVICE
|
|
;[gopher]
|
|
;address = :70
|
|
; the name and port menus send clients back to
|
|
;hostname = bbs.example.org
|
|
;port = 70
|
|
; message areas shown (a wildmat of area names; "": none)
|
|
;areas = general,announcements
|
|
; file areas listed and downloadable
|
|
;files = no
|
|
|
|
; Menus of the sysop's. [menu main] takes the place of the built-in main
|
|
; menu (on 3270s too); others are reached from it. Each item is
|
|
; KEY = ACTION Label: one character (not ; or #), then what it does:
|
|
; areas mail who users profile info files doors chat page terminal
|
|
; logoff back, or door:NAME menu:NAME screen:NAME area:NAME
|
|
; Labels, titles and prompts take @-codes (@USER@, @NEWMAIL@, @BBS@ ...).
|
|
; screen = NAME shows that display file instead of the list of items
|
|
;[menu main]
|
|
;title = @BBS@
|
|
;screen = mainmenu
|
|
;m = areas Message areas
|
|
;e = mail E-mail (@NEWMAIL@ new)
|
|
;f = files File areas
|
|
;d = doors Doors
|
|
;c = chat Chat
|
|
;s = page Page the sysop
|
|
;w = who Who's online
|
|
;b = screen:bulletins Bulletins
|
|
;x = menu:extras Extras
|
|
;g = logoff Goodbye
|
|
;
|
|
;[menu extras]
|
|
;title = Extras
|
|
;prompt = "Extras> "
|
|
;u = users User list
|
|
;p = profile Your profile
|
|
;i = info System info
|
|
;t = terminal Your terminal (3270)
|
|
;q = back Back
|
|
|
|
; The prompts and messages, with @-codes:
|
|
;[strings]
|
|
;name_prompt = "Name: "
|
|
;new_name_prompt = "Name (or NEW): "
|
|
;password_prompt = "Password: "
|
|
;command_prompt = "Command: "
|
|
;pause = "[Press a key]"
|
|
;logoff_confirm = "Log off?"
|
|
;welcome = "Welcome, @USER@."
|