This chapter describes how a fidoconfig config-file is written, which keywords exist and where to put the file.

Config file location
====================

The fidoconfig library searches the config file on different locations:

linux:
     /etc/fido/config

freebsd:
     /usr/local/etc/fido/config

os2/win32/etc:
     in the current directory

If you compile library with huskymak.cfg, the location will be overset with CFGDIR parameter.

Additionally you can set an enviroment variable called FIDOCONFIG which points to the file:

     set FIDOCONFIG=e:\bbs\fidoconfig\config

     FIDOCONFIG=~/fidoconfig/config
     export FIDOCONFIG

The config file(s) must be readable. If you plan using the autoareacreate feature of HPT / autofilecreate featute of HTick / etc..., the config file(s) must be writeable.

Syntax
======

All symbols are not case-sensitive.

{<whiteSpace>} at the start of the line will be ignored.

All keywords are evaluated as occurring, the first matching keyword found is valid. If there are more then one keywords of the same type allowed, the last line matching the situation is valid. Another words: second definition overwrites the previous one. If no match is found, a default value will be used.

"#" at the start of a line or <whiteSpace>#<whiteSpace> within the line starts a comment. The comment ends with the line. Comment char "#" can be overwritten by commentChar token.

If the first word in a line is an undefined keyword, program exits with error message.

Each keyword has to start a new line.

Keyword parameters:

<integer>
     string including integer numbers, like: 1234567890

<string>
     text string, optionally can be quoted.

<bool>
     may be set to "1", "0", "yes", "no", "on", "off", and also without parameters (it means "on").

<addr>
     address string like zone:net/node[.point][@domain]

     example: 2:5000/117

<file>
     file name. path can be omitted.

<path>
     only path. trailing slash may be included or not.

Note! [<parameter>] means that it can be omitted.

FIDOCONFIG library can set up internal variables:

     set basedir=/home/user/fido/

[OS] variable is automatically set up for following operating systems:

UNIX
     All unix-like OS: Linux, *BSD, BeOS, ...

OS/2

WIN

MSDOS

You can set something like:

     if [OS]==UNIX
     tearline `uptime`
     endif

Some programs can be compiled with module variable. It can be used to speed up config parsing:

     if [module]==htick
     include /etc/ftn/fileareas
     endif

And if HPT is running, fileareas aren't parsed because [module]==hpt.

There are following modules available:

hpt (Highly Portable Tosser)

htick (Husky Ticker)

hptutil

hpucode

Also external variables can be parsed:

     autoexec.bat:
     SET VAR=myvar

     fidoconfig:
     if [VAR]==myvar
     ...
     else
     ...
     endif

     ifdef UNIX
     MsgBaseDir  [home]/msgbase
     endif

You can use external programs output via `cmd`. It is available only for UNIX & OS/2+EMX:

     Name Power Station under `uname -mrs`

List of the additional commands:

     set, if, if not, else, elseif, ifdef, ifndef, endif.

You can compare with a pattern by using =~ and !~ instead of == and !=:

     if [VAR] =~ *substr*
     ...
     endif
     if [VAR] !~ bla?bla*
     ...
     endif

Common keywords for HUSKY-programs
==================================

These keywords may be used by several programs. More specific keywords you can find in the programs' individual documentations.

version
-------

Syntax:
     version <integer>.<integer>

Example:
     version 1.4

Here you specify which version of fidoconfig your config belongs to. Currently this statement does nothing.

This statement cannot be repeated.

name
----

Syntax:
     name <string>

Example:
     name Leetebrok BBS

Here you specify your system's name.

This statement cannot be repeated.

location
--------

Syntax:
     location <string>

Example:
     location Dusseldorf

You specify your location here.

This statement cannot be repeated.

sysop
-----

Syntax:
     sysop <string>

Example:
     sysop Matthias Tichy

You specify your name with this keyword.

This statement cannot be repeated.

include
-------

Syntax:
     include <file>

Example:
     include /etc/fido/areas

You can include other files into your config file. For example if you would like to have different config parts, you can include a file and (via cron job or manually) change the content of this file without changing the rest of the config. Additionally you can split your config in different parts. So you can have your fileareas definition in another file than your msgareas definition. This gives you the ability to have some survey about your config.

This statement can be repeated. But don't make recursive includes, e.g. include a file which includes another which includes the first. Although this will be detected and fixed many times, there is a chance that it will not be detected one time.

address
-------

Syntax:
     Address <addr>

Example:
     Address 2:2433/1245

This command specifies which akas your system has. This statement is full 5d compatible, which means you can have also addresses like 2:2433/1245.1@fidonet.org. The first address statement is your main aka which will be used by tosser on different occasions, for example if zone number could not be taken from the @INTL Kludge in netmails.

This statement can be repeated. The domain name is not full supported throughout fidoconfig

commentChar
-----------

Syntax:
     commentChar <char>

Example:
     commentChar ;

This command specifies which symbol is used to mark rest of line as comment. Default is '#'

This statement can be repeated.

outbound
--------

Syntax:
     outbound <path>

Example:
     outbound /var/spool/fido/out

This command specifies your outbound path. This outbound path is binkley-style. A binkley style outbound consists of a base path and subdirectories. Each subdirectory represents a place for all the files for one zone. The base path is the zone path for your base zone.

Example:

     /var/spool/fido/out
          This directory contains the files for your base zone.

     /var/spool/fido/out.003
          This directory contains the files for zone 3.

     /var/spool/fido/out.00A
          This directory contains the files for zone 10.

The zone directory contains the flow-files for each node. A Flow-file of a node has the name NNNNFFFF.?lo

     NNNN
          The 4-digit hex-number of the node's netnumber.

     FFFF
          The 4-digit hex-number of the node's nodenumber.

     ?
          Here the flavour of the mails can be chosen. h-hold, c-crash,
          f-normal, d-direct, i-immediate.

For points there is a subdirectory with nodes flowfilename with suffix.pnt. In this subdirectory the flowfiles have the names PPPPPPPP ( 8-digit point number in hex).

For a deeper background on a binkley-style outbound see the binkley-term documentation and source code.

This statement cannot be repeated.

inbound
-------

Syntax:
     inbound <path>

Example:
     inbound /var/spool/fido/in

This command specifies where your inbound files are stored. This directory is the base directory which means if you have a connection which is not protected and the other system is not listed the files go in here. Only netmails are tossed from this inbound.

This statement cannot be repeated.

tempDir
-------

Syntax:
     tempDir <path>

Example:
     tempDir /var/tmp

This command specifies the path where the temporary files of the fido-programs should be stored. This directory can be erased while booting. Good idea is to set it to a memory disk.

Default value is path specified by TEMP, TMP or TMPDIR enviroment variables (use TEMP first, if it not defined then use TMP, next use TMPDIR). If these enviroment variables are not defined: - win32 versions use %WINDIR%\TEMP (usually c:\windows\temp for Win9x/Me and c:\winnt\temp for Windows NT/2000/XP) - versions for unix-like OS'es use /tmp - other versions use c:\

This statement cannot be repeated.

logfiledir
----------

Syntax:
     logFileDir <path>

Example:
     logFileDir /var/spool/log/fido

This command specifies the path where the log-files of the fido-programs should be stored.

This statement cannot be repeated.

Some programs use logFileDir for persistent temporary/work files.

syslogfacility
--------------

Syntax:
     syslogFacility <facility>

Example:
     syslogFacility local0

Some Husky programs are able to write logs via syslogd instead of via log file. For those programs, this keyword defines which facility to use for writing to the syslog. Syslogd will use this facility name to decide which syslog logfile the log messages will go to. Common names that can be used include mail, news, uucp, local0. The exact values that can be used depend upon your operating system. Refer to the man page for syslog.conf or /usr/include/sys/syslog.h for more information.

Logging via syslogd is only supported on UNIX platforms, and currently only used by herp, but not by any other Husky program. If a Husky program logs via log file or via syslog or both depends on the program and not on your fidoconfig file. Consult the individual program's documentation.

LogLevels
---------

Syntax:
     loglevels <string>

Example:
     loglevels 1345789,A-F Q

This statement defines log levels list for writing messages into log file. Hiphen is a range char (A-F expands to ABCDEF). Only alpha & numeric log level characters are recognized, others are ignored.

In example we output to log messages with levels 3,4,5,7,8,9,A,B,C,D,E,F,Q.

The log levels are following:

1 - Program start, end;

2 - dupecheck

3 - linking messages

4 - scanning messages

5 - posting messages

6 - execute strings

7 - bundles, pkts, links, freqs, file routing, file attachs, msg packing

8 - areafix, relink, autocreate

9 - error messages (critical, usually exit on error)

0 - creation of file-flags

A - trivial error messages (print message and continue execution)

B - warnings & alerts

C - informational messages

D - statistics

E - summary

F - print program name & version

G - message send/sent

H - recoding operations & recoding tables read/write

I - Generate or check MSGID

J - Echomail phase

K - Filebox phase

L - Netmail phase

M - File create

N - File delete

O - operations with opened file (read, write, seek, ...)

P - Directory operations (create, delete, rename, ...)

Q - Email message parsing and construction

R - Truncate file

S - File send/sent

T - Test files (exist, permittions, etc.)

U - Functions calls (entering func & leaving it)

V - reserved

W - reserved

X - Filenames construction

Y - Link messagebase pass (some phase in hptlink & etc)

Z - debug messages: source lines (functions control points).

a-z - debug messages

Default value: 1234567890ABCDEF

This statement cannot be repeated.

ScreenLogLevels
---------------

Syntax:
     screenloglevels <string>

Example:
     screenloglevels 2345789,A-C

Sets levels of log output to screen. See loglevels for details.

This statement cannot be repeated.

seqdir
------

Syntax:
     seqDir <path>

Example:
     seqDir /var/spool/fido/seq

Sets path for current msgid sequence stamp directory. This directory should be used for msgid sequence stamp only to preventing surprises.

By default environment variable SEQDIR is used.

This statement cannot be repeated.

seqoutrun
---------

Syntax:
     seqOutrun <string>

Example:
     seqOutrun 1m

Sets maximum outrun for msgid sequence from current time.

Use decimal number with optional suffix.

Suffixes are:

y - year (365 days)

m - month (31 days)

w - week (7 days)

d - day

h - hour

Set seconds without suffix.

By default environment variable SEQOUT is used, or 3y if it isn't set.

This statement cannot be repeated.

Pack
----

Syntax:
     Pack zip|tgz|rar|arc|arj|..... <call>

Example:
     Pack zip zip -9 -g -q $a $f

This statement sets the command line call for the packer. The file will be moved into the archive, that means the file will be deleted from the harddisk. It only remains in the archive.

$a will be replaced by the archive file.

$f will be replaced by the file which should be packed into the archive.

This statement can be repeated.

See also hpt and htick documentation.

Note
----

On some OSes, if a program called can't be found (can't be run) result of pack command is undefined. (Example: DOS. Reason of this: command.com does not return error code if executable file was not found.) To prevent danger write full path name for packer program, please.

Unpack
------

Syntax:
     Unpack "<call>" <offset> <matchcode>

Example for DOS:

          Unpack  "c:\arc\pkunpak /r $a $p $f"                 0 1a
          Unpack  "c:\arc\pak e /wn $a $p"                    -2 fe
          Unpack  "c:\arc\lha e /m $a $p $f"                   2 2d6c68
          Unpack  "c:\arc\zoo e:O $a $p $f"                    0 5a4f4f
          Unpack  "c:\arc\jar e -y $a $p $f"                  14 1a4a61721b
          # *.rar
          Unpack  "c:\arc\unrar e -y -c- -o+ -inul $a $p $f"   0 52617221
          # rar-sfx/DOS
          Unpack  "c:\arc\unrar e -y -c- -o+ -inul $a $p $f"  28 52534658

Example for Linux:

          Unpack  "/usr/bin/zoo e:O $a $p $f"                    0 5a4f4f
          Unpack  "/usr/bin/arc eno $a $p'*.*' $f"               0 1a
          Unpack  "/usr/bin/unzip -joLqq $a -d $p $f"            0 504b0304
          Unpack  "cd $p && /usr/bin/unarj e $a $f>/dev/null"    0 60ea
          Unpack  "/usr/bin/unrar e -y -c- -o+ -inul $a $p $f"   0 52617221
          Unpack  "/usr/bin/unrar e -y -c- -o+ -inul $a $p $f"  28 52534658
          Unpack  "/usr/bin/jar e -y $a $p $f"                  14 1a4a61721b
          Unpack  "cd $p && /usr/bin/ha eyq -e $a $f"            0 4841

This statement sets the call of certain unpackers according to the id in the archive file

call is the command line call for the packer (enclosed into quotes!);

offset position of recognition string in packed file;

match code hexdump of the recognition string for packed file, ?? can be used as any byte;

$a will be replaced by the archive file to extract from archive;

$p will be replaced by the path to unpacked files (usually tempoutbound);

$f will be replaced by the description file name if any (used by htick, see 'FileDescName' token; possibly other husky programs).

     e.g.: unpack "unzip -joLqq $a -d $p $f" 0 504b0304

            files packed by zip can be recognized by
              504b0304(hex) at offset 0(integer)
            they can be unpacked by htick using command
            "unzip -joLqq <filename> -d <path> <descrption_filename>"

This statement can be repeated.

Also see hpt and htick documentation.

Note
----

On some OSes, if a program called can't be found (can't be run) result of unpack command is undefined. (Example: MS DOS. Reason of this: command.com does not return error code if executable file was not found.) To prevent danger write full path name for unpacker program, please.

link
----

Syntax:
     link <string>

Example:
     link Matthias Tichy

This statement starts a new Link-definition. All the following link-related statements change the configuration of this link until a new link statement is found. The name is the name of this link.

Links must appear before any area definition. Virtual links for all AKAs defined in config will be created automatically.

This statement can be repeated.

linkdefaults
------------

Syntax:
     linkdefaults [begin | end | destroy]

Example:
     linkdefaults

This statement starts section of default definitions of links. All the following link-related statements change default configuration of link until a 'link' or 'linkdefaults end' or 'linkdefaults destroy' statement is found. All parameters collected in linkdefaults sections are copied to link configuration every time when 'link' statement is found in configuration file. Link-related statements after 'linkdefaults end' or 'linkdefaults destroy' or before first 'link' or 'linkdefaults' statement are treated as error. 'linkdefaults' statement without 'begin' or 'end' means 'linkdefaults begin' 'linkdefaults destroy' destroys all default definitions.

Be careful with Pause, Export, etc. ;-)

This statement can be repeated. New definitions overwrite old ones.

aka
---

Syntax:
     aka <addr>

Example:
     aka 2:2433/1245

This statement sets the aka for the current link.

This statement can only be repeated for different links.

ouraka
------

Syntax:
     ouraka <addr>

Example:
     ouraka 2:2433/1247

This statement sets the aka which is used with this link.

This statement can only be repeated for different links.

password
--------

Syntax:
     password [<string>]

Example:
     password secret

This statement sets the default password for the link. If you do not change the other passwords, they are set to this password. Password is case insensitive.

This statement can only be repeated for different links.

pktpwd
------

Syntax:
     pktpwd [<string>]

Example:
     pktpwd geheim

This statement sets the pktpassword for the actual link. Only passwords with maximal 8 characters are valid because of limitations of other software packages. An empty statement is allowed.

This statement can only be repeated for different links.

ticpwd
------

Syntax:
     ticpwd [<string>]

Example:
     ticpwd geheim

This statement sets the ticker password for the actual link. Only passwords with maximal 8 characters are valid because of limitations of other software packages. An empty statement is allowed.

This statement can only be repeated for different links.

areafixpwd
----------

Syntax:
     areafixpwd [<string>]

Example:
     areafixpwd geheim

This statement sets the areafix password for the actual link. An empty statement is allowed, but not recommended.

This statement can only be repeated for different links.

filefixpwd
----------

Syntax:
     filefixpwd [<string>]

Example:
     filefixpwd geheim

This statement sets the filefix password for the actual link. An empty statement is allowed, but not recommended.

This statement can only be repeated for different links.

bbspwd
------

Syntax:
     bbspwd [<string>]

Example:
     bbspwd geheim

This statement sets the bbs password for the actual link. An empty statement is allowed.

This statement can only be repeated for different links.

sessionpwd
----------

Syntax:
     sessionpwd [<string>]

Example:
     sessionpwd geheim

This statement sets the session password for the actual link. An empty statement is allowed.

This statement can only be repeated for different links.

handle
------

Syntax:
     handle <name>

Example:
     handle eddie

This statements gives a link a nickname. This statement is supposed for bbs systems.

This statement can only be repeated for different links.

packer
------

Syntax:
     packer <packer>

Example:
     packer zip

This statement sets the packer for the link. You can use the packer which you has set up using the pack statement. If you omit this statement or set packer none no mail will be packed. The pkts will be put in the outbound.

This statement can only be repeated for different links.

badarea
-------

Syntax:
     BadArea <name> <file> [-b <msgbase>] [Options]

Example:
     BadArea badarea /var/spool/fido/msgb/bad -b Squish

This statement specifies the BadArea. Read HPT documentation for details.

This statement cannot be repeated.

dupearea
--------

Syntax:
     dupeArea <name> <file> [-b <msgbase>] [Options]

Example:
     dupeArea dupeArea  /var/spool/fido/msgb/dupes -b Squish

This statement specifies the DupeArea. Read HPT documentation for details.

This statement cannot be repeated.

echoarea
--------

Syntax:
     EchoArea <name> <file> [-b <msgbase>] [Options] [linkAKAs] [linkOptions]

Example:
     EchoArea linux.develop.ger /var/spool/fido/msgb/linux.develop.ger -b Squish -a 2:2433/1247 -g A -dupeCheck move -dupehistory 11 -d "Linux development" 2:2433/1245 -def

This statement specifies the echoarea. Read HPT documentation for details.

This statement can be repeated.

netmailarea
-----------

Syntax:
     NetmailArea <name> <file> [-b <msgbase>] [Options]

Example:
     NetmailArea netmail /var/spool/fido/msgb/netmail -b Squish

This statement specifies the NetMailArea. Read HPT documentation for details.

This statement can be repeated.

localarea
---------

Syntax:
     LocalArea <name> <file> [-b <msgbase>] [Options]

Example:
     LocalArea MyBBSarea /var/spool/fido/msgb/MyBBS -b Squish

This statement specifies the LocalArea: messages area in BBS. Read HPT documentation for details.

filearea
--------

Syntax:
     FileArea <name> <fileareapath> <uplink> [options] [<downlinks>]

Example:
     filearea Photoes /var/spool/fido/fileecho/Photoes 2:50/1 -d "Sysop photoes"

This statement specifies the FileArea: fileecho definition. Read HTick documentation for details.

bbsarea
-------

Syntax:
     bbsarea <name> <bbsareapath>

Example:
     BBSarea Incoming /var/spool/fido/BBS/incoming

This statement specifies the BBSArea: BBS file area definition. It's used for filelist building. Read HTick documentation for details.

Highly Portable Tosser keywords
===============================

This section contains keyword-list only. Read HPT Manual for more info.

          [file keywords.hpt not included]

HTick (Husky Ticker) keywords
=============================

This section contains keyword-list only. Read HTick Manual for more info.

          [file keywords.htick not included]

NLTools keywords
================

nodelistDir
-----------

Syntax:
     nodelistDir <path>

Example:
     nodelistDir /var/spool/fido/nodelist

This command specifies the path where the actual nodelists are or should be written to. This path contains the raw nodelist (see nodelist). Also, compiled nodelists like the FIDOUSER.LST will be stored here.

This statement cannot be repeated.

fidoUserList
------------

Syntax:
     fidoUserList <filename>

Example:
     fidoUserList fidouser.lst

If this keyword is present, the nodelist compiler (e.g. ulc) is instructed to build a user list file with the given filename in the nodelist directory (see nodelistdir). This is a simple text file with fixed line length that contains user names (nodes, points) and their corresponding node or pointnumbers. The file is sorted alphabetically by user name (case insensitive), so that it can be bsearched to implement a quick node numer lookup functinality. The fido user list file format is understood by msged, for example.

nodelist
--------

Syntax:
     Nodelist <name>

Example:
     Nodelist nodelist or Nodelist points24

This statement starts a new nodelist definition. All the following nodelist-related stamtements change the configuration of this nodelist until a new nodelist statement is found.

The name that you specify must match the base name (without extension and without pathname) of the raw, unpacked, nodelist file. The husky tools ulc and nlupdate math the file name case-insensitively, but other tools may need the exact spelling. The raw nodelist file is expected to reside in the nodelist directory (see nodelistdir).

diffupdate
----------

Syntax:
     DiffUpdate <path_and_basname>

Example:
     DiffUpdate /var/spool/filebase/nodediff/nodediff

Here you can specify the base filename of nodelist difference files (nodediffs) that are used to keep the corresponding nodelist up to date. The argument to the DiffUpdate is the full file name with path of a difference file, without the file extension. For example, if you have a file area at /var/spool/filebase/24000, where your ticker places the updates for the German Pointlist, and those update files are called points24.a26, points24.a33, and so on, you would use

     DiffUpdate /var/spool/filebase/24000/points24

The Diffupdate keyword is used by nlupdate, for example. The nodelist updater will unpack the difference file (if it is archived, of course, unpacked diffs are also supported), apply the diff to the corresponding nodelist, and delete the temporary unpacked diff again.

fullupdate
----------

Syntax:
     FullUpdate <path_and_basname>

Example:
     FullUpdate /var/spool/filebase/nodelist/nodelist

This statement works like DiffUpdate (see diffupdate). The difference is that here you don't specify the location of a nodelist difference file, but the locations where complete nodelist files/archives can be found. Some othernets do not (regularly) distribute a nodediff file, but just hatch a new nodelist every few weeks. In this case, you need the FullUpdate statement.

defaultzone
-----------

Syntax:
     DefaultZone <zone>

Example:
     DefaultZone 2

Some nodelist files do not start with a Zone entry. This is the case for the German Points24 list, for example, but could also happen for othernets that only have one zone. In this case, you can use the DefaultZone keyword to specify the default zone number for all nodes listed in this nodelist.

nodelistformat
--------------

Syntax:
     Nodelistformat <format>

Example:

          NodelistFormat standard
          NodelistFormat points4d
          NodelistFormat points24

Here you can specify the format of the unpacked nodelist. The default is standard; this is the normal Fidonet nodelist format. You can also specify points4d, which is needed for the nodelist compiler to recognise a standart pointlist in 4D format or points24 for the German points24 format as such, so that it can see the proper 5D point numbers instead of the fakenet numbers.

EmailPkt keywords
=================

email
-----

Syntax:
     sendMailCmd string

Example:
     sendMailCmd /usr/sbin/sendmail $a <$f

This keyword is used to define send mail command & its parameters. Macro '$a' specifies position of the recipient e-mail address; macro '$f' specifies position of name of file with message body. If '$f' is omitted then message body will be taken from stdin.

This statement can't be repeated.

email
-----

Syntax:
     email <email-address>

Example:
     email eddie@ironmaiden.com

This keyword is used to set the email-address for the link. This can be used to send pkts via email.

This statement can only be repeated for different links.

emailFrom
---------

Syntax:
     emailFrom <email-address>

Example:
     emailFrom fred@ironmaiden.com

This keyword is used to set the email-address used as sender address for outgoing emails to this link.

This statement can only be repeated for different links.

emailSubj
---------

Syntax:
     emailSubj <subject>

Example:
     emailSubj Fido over EMail message in UUE format

This keyword is used to set the subject for emails to and from this link. It may be ignored by some encodings (e.g. SEAT).

This statement can only be repeated for different links.

email
-----

Syntax:
     emailEncoding (MIME | SEAT | UUE)

Example:
     emailEncoding MIME

This keyword is used to set the encoding for outgoing emails to this link.

This statement can only be repeated for different links.

BSOpack keywords
================

This section contains keyword-list only. Read BsoPack Manual for more info.

          [file keywords.bp not included]

herp keywords
=============

Herp is the Husky External file Request Processor. The following fidoconfig keywords are specific to herp. Some programs of herp, in particular herpidx, also use part of the htick configuration, i.E. filearea definitions.

reqidxdir
---------

Syntax:
     reqidxDir <path>

Example:
     reqidxDir /var/spool/fido/reqidx

This command specifies a subdirectory which will be used to store the request index generated by herpidx. This subdirectory should be writable for the herpidx process and at least readable for the user under which your mailer and herp will be run. herpidx will place various request index files here. The subdirectory should not be used for any other purposes. The index can become rather large, so plan for enough free disk space.

Working sample config
=====================

          [file config not included]