Mystic Utilities (MUTIL)
Scripting Custom Modules
Mystic Utilities (MUTIL)
Scripting Custom Modules
There are several executable programs that comprise the Mystic BBS ecosystem. This page provides a brief overview of each and explains how they interact with each other.
MYSTIC is the heart of Mystic BBS. Incoming Telnet callers connect to this to executable via MIS. If no command line option is supplied, Mystic will attempt to start up locally so that you may log into the BBS, automatically selecting the first available node for you.
In addition to no command line, the following options can be used:
MYSTIC -CFG This tells Mystic to start in local configuration mode. MYSTIC -CP$ This tells Mystic in Unix environments to start in a particular codepage (UTF8 or CP437). Ex: -CPUTF8 or -CP437 MYSTIC -HOST$ This specifies the user's hostname which should be passed into Mystic by the telnet server. Ex: -HOSTphl.verizon.net MYSTIC -IP$ This specifies the user's IP address which should be passed into Mystic by the telnet server. Ex: -IP184.108.40.2061 MYSTIC -N# This specifies a specific node number. There is usually no reason to use this, as Mystic will automatically select an available node. Ex: -N1 tells Mystic to start node 1. MYSTIC -PATH Opens a dialog box where Mystic's base system directories can be configured. This is useful for when switching operating systems or moving Mystic to a new directory name MYSTIC -T# This specifies the number of minutes the user will be permitted to use this session. Ex: -T60 limits the user to only an hour even if they have many hours of time left MYSTIC -TID# This specifies the socket handle when using Mystic with a third party telnet server under Windows MYSTIC -U$ This specifies the username to login to Mystic with and must be used along side the -P command to supply the password. If a user name has a space in it, the spaces should be replaced by an underscore. For example: mystic -uJoe_User -pMYPASSWORD The above example will automatically attempt to login as the Joe User. MYSTIC -VER Prints the Mystic version number and exits MYSTIC -X$ This specifies a MPL program to execute and then exit Mystic afterwards. The -U and -P must also be supplied with this in order to tell Mystic which user to run the MPL program as mystic -uJoe_User -pMYPASSWORD -xusage The above will execute usage.mpx from the scripts directory after logging in as Joe User, and then exit the BBS after execution. If command arguments need to be passed to the executed script then they must be enclosed with quotations such as: mystic -uJoe_User -pMYPASSWORD "-xmyscript option1 option2" MYSTIC -Y$ This specifies a PYTHON program to execute and then exit Mystic afterwards. The -U and -P must also be supplied with this in order to tell Mystic which user to run the PYTHON program as mystic -uJoe_User -pMYPASSWORD -ytestpython The above will execute testpython.mpy from the scripts directory after logging in as Joe User, and then exit the BBS after execution.
The Mystic Internet Server (MIS) is an application which acts as a server for various internet protocols. It can support one or all of the following:
Telnet, POP3, SMTP, FTP, NNTP, BINKP, Events
Note that the POP3, SMTP servers are used for Mystic BBS internal 'Email' only at this time. The Events system is used by Mystic to call other programs based on time of day or as semaphores are created that trigger events such as importing echomail and/or netmail.
MIS is something you will want to keep running 24/7.
MIS needs to exist in the same folder as MYSTIC.EXE and MYSTIC.DAT files in order to work. It optionally will check for the “mysticbbs” environment variable if it exists to find the directory where MYSTIC.DAT resides.
The options for MIS can be found in the Servers menu within the Mystic BBS Configuration System by running the following command:
You can enable/disable different server types, change their listening ports, and some other options.
Keep in mind that Linux will require a root user by default to bind to server ports less than 1024, so if you enable your telnet server and cannot connect, try a port higher than 1024 to make sure it is working.
Setting up a telnet BBS is as simple as loading MIS and telnetting in! :)
MIS will check your Mystic DATA directory for file named “badip.txt”. It will use this file to check against the IP addresses of incoming connections. For example, if you wanted to block 220.127.116.11 you would simply add a line into the badip.txt file with that IP address.
IP blocking supports wildcards too, so for example, you could put 123.123.123.* and block any IP address that begins with 123.123.123.
If an IP address is blocked, Mystic will attempt to send them the contents of the file “blocked.txt” from the Mystic DATA directory.
If this file does not exist, it will simply print “BLOCKED” to the connection's terminal and disconnect them.
You can also add a “goodip.txt” file the Mystic DATA directory. This file will exempt an IP address from the DNS blacklist, DNS country check, and the auto ban IP systems. The format of the file is the same as “badip.txt”. If you know of certain IP addresses you never want to see auto banned on your system - “goodip.txt” is a great way to ensure that never happens!
There is currently a developmental MIS2 server also available to play with :) It uses whitelist.txt and blacklist.txt respectively in the Mystic DATA directory. These files work the same way as the MIS counterparts.
Entries in these lists can contain a mixture of both IPV4 and IPV6 addresses and can contain a single wildcard, using an asterisk to mask an IP range. For example “127.*” would block any IPV4 address that begins with “127.”. IPV6 works in the same way, expand the IPV6 address up to the point where you want to wildcard it, such as “014f:*”
MIS will block an IP from opening multiple connections to the BBS. If a person is already connected to Mystic and they attempt to open a second connection, MIS will attempt to send them the contents of the file “dupeip.txt” from the Mystic DATA directory.
If the file does not exist, it will simply send them “Only 1 connection(s) per user” and disconnect only their second connection.
Their first connection will remain untouched.
If a connection is made when all of the nodes configured for telnet are being used, MIS will attempt to send them the contents of busy.txt from the Mystic DATA directory. If this file does not exist, it will simply print “BUSY” to the terminal and disconnect them.
Mystic Utilities, otherwise known as MUTIL is an automated maintenance and utility program that is controlled by .ini configuration file(s).
Think of MUTIL as the Swiss Army Knife utility program for Mystic BBS. It can be tasked with running multiple functions at once or be configured in a far more granular fashion to do one task at a time when called.
More details can be found in the MUTIL section of this wiki.
This program sends and receives echomail and netmail packets tor configured EchoMail Nodes. It uses one of three configured options to do so - BINKP, FTP, or Directory-based transmission.
Optional switches for FIDOPOLL are:
FIDOPOLL LIST - List configured Echomail nodes FIDOPOLL ROUTE - Show netmail route information FIDOPOLL SEND - Only send/poll if node has new outbound messages FIDOPOLL FORCED [type] - Poll/send to all nodes of session [type] (blank/all) FIDOPOLL [Address] - Poll/send echomail node [Address] (ex: 46:1/100) FIDOPOLL SEARCH [data] - Search nodelist for [DATA] can be address or text FIDOPOLL KILLBUSY - Reset busy flags for all echomail nodes
EchoMail nodes are configured in the Mystic BBS Configuration System under the 'Configuration' menu.
QWKPOLL automatically deals with QWK and REP packets during polling.
The export and import functions are not needed, and only provided for systems that may want to use an alternative transport method.
Syntax: QWKPOLL [ALL] [Qwk Network Index] [EXPORT] [Index/ALL] [PATH TO CREATE REP] [IMPORT] [Index/ALL] [PATH OF QWK PACKET] Ex: QWKPOLL ALL - Exchange with ALL QWK hubs via FTP QWKPOLL 1 - Exchange with only Qwk Network #1 QWKPOLL 1 EXPORT /bbs/qwknet - Create REP packet in /bbs/qwknet QWKPOLL ALL IMPORT /bbs/qwknet - Import QWK packets from /bbs/qwknet
Mystic BBS Utilities is a depreciating set of utilities that are slowly being absorbed in to MUTIL.
In recent times the command line options for this program have started to be removed and now appear as stanzas in .ini configuration file(s) used by MUTIL.
At present the following options are available:
Usage: MBBSUTIL <Options> The following command line options are available: -AREASOUT <File> Export AREAS.BBS format file in <File> -BKILL <ID> <Days> Delete BBSes which haven't been verified in <DAYS> -BPACK Pack all BBS lists -BSORT <ID> <Type> Sorts and packs BBS list by <type> -FIXINDEX Fix wrong perm index for user/msg/file bases -FSORT Sort file base entries by filename -MTRASH <File> Delete messages to/from users listed in <File> -NOCHECK Bypass online user check at startup -UKILL <Days> Delete users who have not called in <DAYS>
Mystic Integrated Development Environment or MIDE is a development tool that aids budding coders in building scripts using Mystic Programming Language (MPL). It's a text editor which helps you to create MPX programs. This program allows MPS source files to be edited and compiled, while offering some other features that a normal text editor does not.
You will find this tool in the /mystic/scripts directory. Run it using the following command.
The Mystic BBS Programming Language Compiler allows sysops to compile their own scripts written in Mystic Programming Language (MPL). This program translates a MPS source file into a MPX executable file. A MPS source file is a text file which contains programming commands recognized by the MPE engine. These files can be edited with any text editor, or the supplied MIDE program described above.
Check out the /mystic/scripts directory for examples of MPS files.
Available options to use this program are:
MPLC [filename] Compile a MPL script e.g. MPLC mpldemo.mps MPLC -ALL Compile all scripts found