Files
comet/COMET.SAM
Ken Johnson bade0eb593 Comet 1.00 - Initial commit: complete standalone FidoNet TCP mailer
Standalone FidoNet mailer daemon implementing the Comet protocol
(TCP variant of the Nova protocol family) with BinkP/1.1 fallback.
Written in Free Pascal for DOS/Win/OS2/Linux/FreeBSD.

15 source files, ~10K lines:
- Protocol: length-prefixed frames, SHA-256/384/512, CRC-32,
  bidirectional transfer with sliding window, adaptive block sizing
- Session: own TCP handshake with BinkP auto-detection on port 26638
- Outbound: BSO (Binkley), FrontDoor, D'Bridge format support
- Daemon: multi-session with thread pool, outbound scanner
- Paths: DOS<->Linux bridge with case-insensitive lookup, drive mapping
- Config: INI-style with heavily documented sample (COMET.SAM)

All 17 Nova interop bug fixes baked in from the start.
18/18 tests passing (CRC-32, SHA-256/384/512, frame encode/decode).
2026-03-29 20:02:37 -07:00

325 lines
12 KiB
Plaintext

; =========================================================================
; COMET.CFG - Comet Mailer Daemon Configuration
; Version 1.00
; =========================================================================
;
; This is a sample configuration file for the Comet FidoNet mailer.
; Copy this file to COMET.CFG and edit it for your system.
;
; Lines beginning with ; are comments.
; Inline comments: anything after ; on a line is ignored.
; Values with spaces must be quoted: SystemName = "The Danger Zone"
;
; Run CSETUP for interactive configuration, or edit this file directly.
;
; =========================================================================
; =========================================================================
; [System] - Your FidoNet identity
; =========================================================================
;
; These settings identify your system to remote nodes during sessions.
; At least one Address is required. Multiple addresses are supported
; for systems that are members of multiple networks.
[System]
; Your FidoNet address(es). Format: zone:net/node or zone:net/node.point
; You can list multiple addresses, one per line.
; The first address is your primary (used for outbound zone detection).
;
; Examples:
; Address = 1:213/725 ; Boss node
; Address = 1:213/725.1 ; Point
; Address = 21:1/100 ; FSXnet
;
Address = 1:213/725
; Your name (sysop). Shown to remote systems during handshake.
SysOp = Ken Johnson
; Your system/BBS name. Shown to remote systems during handshake.
SystemName = The Danger Zone
; Your location (city, state/country). For informational display.
Location = Sparks, NV
; =========================================================================
; [Network] - TCP listener and connection settings
; =========================================================================
;
; Comet listens on a single TCP port for both Comet protocol and
; BinkP fallback connections. Protocol auto-detection happens on
; the first bytes received from the remote.
[Network]
; TCP port to listen on. Default is 26638 (C-O-M-E-T on phone keypad).
; This is the port you need to forward in your router/firewall.
; Both Comet and BinkP connections come in on this same port.
Port = 26638
; Bind address. Which network interface to listen on.
; Leave empty or use * for all interfaces (recommended).
; Use 127.0.0.1 to only accept local connections (testing).
; Use a specific IP to listen on one interface only.
;
; Examples:
; Bind = ; All interfaces (default)
; Bind = * ; Same as above
; Bind = 192.168.1.100 ; Specific interface only
; Bind = 127.0.0.1 ; Localhost only (testing)
;
Bind =
; Maximum simultaneous sessions. Each session uses one thread.
; Set based on your system's resources and bandwidth.
; Minimum: 1, Maximum: 32, Default: 5
MaxSessions = 5
; How often to scan the outbound directory for pending mail (seconds).
; Set to 0 to disable automatic outbound polling (inbound only).
; Default: 60 seconds
PollInterval = 60
; =========================================================================
; [Paths] - Directory locations
; =========================================================================
;
; All paths must exist before Comet starts, or Comet will create them.
; On Linux/FreeBSD, use forward slashes: /home/user/fido/inbound/
; On DOS/Windows/OS2, use backslashes: C:\FD\INBOUND\
; Trailing slash is optional.
[Paths]
; Inbound directory - where files from UNKNOWN/unpassworded nodes go.
; This is your "unsecure" inbound. Tossers should check this directory
; for incoming mail packets, but exercise caution with untrusted files.
Inbound = /var/lib/fidonet/inbound/
; Secure inbound - where files from PASSWORD-VERIFIED nodes go.
; If not set, all files go to Inbound regardless of password status.
; Your tosser should primarily process files from here.
SecInbound = /var/lib/fidonet/secure/
; BSO outbound base directory. This is the root of your Binkley-Style
; Outbound directory tree. Zone subdirectories (outbound.001/, etc.)
; and point directories (XXXXXXXX.PNT/) are created automatically.
;
; This must match what your tosser/packer writes to.
; For binkd compatibility, use the same outbound as binkd.cfg.
Outbound = /var/lib/fidonet/outbound/
; Temporary directory for files being received. Files are written here
; during transfer and moved to Inbound/SecInbound on completion.
; Using a temp directory on the same filesystem as Inbound allows
; atomic rename (no copy needed).
Temp = /var/lib/fidonet/temp/
; Main log file. Session events, errors, file transfers are logged here.
; If not set, logging goes to console only.
LogFile = /var/log/fidonet/comet.log
; Debug/trace log. Protocol-level detail: every frame sent/received,
; CRC values, state transitions. Very verbose - only enable when
; troubleshooting protocol issues.
; Enable with Debug = yes in [Logging] section.
DebugLog = /var/log/fidonet/comet-debug.log
; Nodelist directory. Where compiled nodelists are stored.
; Used for outbound address resolution (finding IP for a node).
; Not yet implemented - currently nodes must be configured explicitly
; in [Node:] sections below.
Nodelist = /var/lib/fidonet/nodelist/
; Flags/semaphore directory. BSY files and rescan flags go here.
; If not set, BSY files are created in the outbound directory.
Flags = /var/lib/fidonet/flags/
; =========================================================================
; [DriveMap] - DOS drive letter to Unix path mapping
; =========================================================================
;
; IMPORTANT FOR LINUX/FREEBSD USERS:
;
; If you're running Comet on Linux but sharing outbound directories
; with a DOS/Windows mailer (or reading flow files written by one),
; the .FLO files will contain DOS-style paths like C:\FD\OUTBOUND\FILE.PKT
;
; These drive mappings tell Comet how to translate DOS paths to Unix:
; C:\FD\OUTBOUND\FILE.PKT -> /home/user/dos/c/fd/outbound/FILE.PKT
;
; Comet also handles case-insensitive file lookup automatically -
; FILE.PKT, file.pkt, and File.Pkt are all found.
;
; On DOS/Windows/OS2: this section is ignored (paths work natively).
;
; Format: DriveLetter = /unix/path
; The drive letter must be uppercase A-Z.
; The Unix path should be the root of what that drive letter maps to.
[DriveMap]
; C = /home/user/dos/c
; D = /home/user/dos/d
; =========================================================================
; [Protocol] - Transfer protocol settings
; =========================================================================
;
; These control the Comet file transfer protocol behavior.
; Default values work well for most TCP connections.
; You generally don't need to change these unless troubleshooting.
[Protocol]
; Maximum block size in bytes. Data is sent in blocks up to this size.
; Larger blocks = less overhead = higher throughput on fast links.
; Smaller blocks = faster error recovery on unreliable links.
;
; Range: 512 to 65528 bytes.
; Default: 65528 (maximum - best for TCP)
; On modem/dialup: consider 2048 or less
MaxBlockSize = 65528
; Sliding window size. Number of unacknowledged data blocks allowed
; in flight simultaneously. Higher values improve throughput on
; high-latency links (satellite, intercontinental).
;
; Range: 1 to 16
; Default: 8 (good for most TCP connections)
; High latency: try 12-16
; Unreliable links: try 2-4
WindowSize = 8
; Braindead timeout in seconds. If no valid data is received from
; the remote for this many seconds, the session is aborted.
; Default: 120 seconds (2 minutes)
Timeout = 120
; Handshake timeout in seconds. Maximum time to wait for the
; initial protocol handshake to complete.
; Default: 30 seconds
HandshakeTimeout = 30
; Disable SHA-256 file verification. NOT RECOMMENDED.
; SHA-256 ensures files are transferred correctly and enables
; content-based resume (resume even if filename/date changed).
; Only disable for debugging purposes.
; Default: no (SHA-256 is enabled)
; NoSHA256 = no
; Disable file request (FREQ) support.
; Default: no (FREQ is enabled)
; NoFREQ = no
; =========================================================================
; [BinkP] - BinkP protocol fallback settings
; =========================================================================
;
; When connecting to a remote node, Comet tries the Comet protocol
; first. If the remote doesn't speak Comet, it falls back to BinkP/1.1.
;
; Inbound connections are auto-detected: if the first bytes look like
; a BinkP frame instead of a COMET banner, the connection is handled
; as BinkP automatically.
[BinkP]
; Enable BinkP fallback for outbound connections.
; Default: yes
Enabled = yes
; Default BinkP port for outbound fallback connections.
; When Comet protocol fails on port 26638, Comet tries BinkP
; on this port. This is the standard binkd port.
; Per-node override available in [Node:] sections.
; Default: 24554
Port = 24554
; =========================================================================
; [Logging] - Log output settings
; =========================================================================
[Logging]
; Minimum log level for the log file.
; Levels: debug, info, warning, error, fatal
; Default: info
FileLevel = info
; Minimum log level for console (stdout) output.
; Default: info
ConsoleLevel = info
; Enable debug/trace logging to the DebugLog file.
; This is VERY verbose - every protocol frame is logged.
; Default: no
Debug = no
; =========================================================================
; [Node:address] - Per-node configuration
; =========================================================================
;
; Configure settings for specific remote nodes. The section name
; includes the node's FidoNet address:
;
; [Node:1:213/723] ; A boss node
; [Node:1:213/723.1] ; A point
; [Node:21:1/100] ; An FSXnet node
;
; At minimum, you need the Host (IP or hostname) for each node
; you want to call. Nodes that call YOU don't need an entry here
; unless you want to set a session password.
;
; Available settings:
;
; Password Session password (both sides must match)
; Host IP address or hostname to connect to
; Port Comet port (default: 26638)
; BinkpPort BinkP fallback port (default: 24554)
; NoBinkp Disable BinkP fallback for this node (yes/no)
; NoComet Use only BinkP for this node (yes/no)
; SessionPassword Separate BinkP password if different from Password
; --- Example nodes ---
; [Node:1:213/723]
; Password = SECRET
; Host = bbs.example.com
; Port = 26638
; [Node:21:1/100]
; Password = FSXNET
; Host = 192.168.1.50
; Port = 26638
; BinkpPort = 24554
; [Node:1:103/705]
; Host = fido.oldschool.org
; NoComet = yes ; This node only speaks BinkP
; BinkpPort = 24554
; =========================================================================
; End of configuration
; =========================================================================
;
; After editing, start Comet with:
; comet (daemon mode - listen + poll outbound)
; comet -c /path/to/comet.cfg (specify config file location)
; comet call 1:213/723 (single outbound call for testing)
; comet -d (daemon with debug logging enabled)
;
; For complete documentation see COMET.DOC.
; For the wire protocol specification see FSP-COMET.001.
; =========================================================================