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 they appear, the first matching keyword found applies. If more than one keyword of the same type is allowed, the last line applies. In other words, the subsequent definition replaces 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. The comment char "#" can be changed by commentChar token.

If a line ends with a backslash with a preceding space, the next line is its continuation and they make one line with the backslash removed. This functionality was added for one reason: to be able to use short continuation lines in the configuration example in the documentation, so that the lines do not end up being truncated after exporting the text to pdf. So the configuration example with line continuations from the documentation can be used in real life. But this feature is not intended for regular use. After any change to the line with continuation, all the continuations will be appended to the first part of the line, forming a line without continuations. For example, if areafix adds a new node to an Echoarea line that uses one continuation after " \" (that is, this Echoarea is located on two physical lines), then the two physical lines will be merged into one and there will be no continuation after " \". The line will become long and will not contain a backslash. Therefore, you should not use the line continuation feature to make the config prettier.

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

Each keyword has to start a new line.

Keyword parameters:

<integer>
     string including integer numbers, like: 1234567890

<string>
     text string, optionally in double quotes.

<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.

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.

dailynodelist
-------------

Syntax:
     Dailynodelist <bool>

Example:
     Dailynodelist on orDailynodelist off

If you set Dailynodelist to on, NLTools do a full update of the nodelist on a daily basis, instead of checking if the new nodelist is 7 days newer. You have to set FullUpdate and Dailynodelist statements and not the DiffUpdate statement for the daily nodelist processing. Default is off

This token can be repeated.

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.

delapplieddiff
--------------

Syntax:
     delAppliedDiff <bool>

Example:
     delAppliedDiff on ordelAppliedDiff off

NLTools can delete nodediffs after applying them if you set delAppliedDiff to on. Default is off

This token can't be repeated.

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

sendMailCmd
-----------

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.

emailEncoding
-------------

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.

A working sample config
=======================

          [file config not included]