1@c this is the proposal info file
2
3This chapter describes how a fidoconfig config-file is written, which keywords
4exist and where to put the file.
5
6@menu
7* Location:: Where to put the config file
8* Syntax::   Syntax
9* Common::   Common keywords
10* HPT::      HPT (Highly Portable Tosser) keywords
11* HTick::    HTick (Husky Ticker) keywords
12* NLTools::  NLTools keywords
13* EmailPkt:: EmailPkt keywords
14* BSOpack::  BSOpack keywords
15* herp::     Husky External Request Processor keywords
16* Example::  Here is a sample config file which works for me
17@end menu
18
19@node Location, Syntax, config file, config file
20@section Config file location
21The fidoconfig library searches the config file on different locations:
22
23@table @asis
24@item linux:
25/etc/fido/config
26@item freebsd:
27/usr/local/etc/fido/config
28@item os2/win32/etc:
29in the current directory
30@end table
31
32If you compile library with huskymak.cfg, the location will be overset with
33CFGDIR parameter.
34
35Additionally you can set an enviroment variable called @code{FIDOCONFIG} which
36points to the file:
37
38@example
39set FIDOCONFIG=e:\bbs\fidoconfig\config
40
41FIDOCONFIG=~/fidoconfig/config
42export FIDOCONFIG
43@end example
44
45The config file(s) must be readable. If you plan using the autoareacreate
46feature of HPT / autofilecreate featute of HTick / etc..., the config
47file(s) must be writeable.
48
49@node Syntax, Common, Location, config file
50@section Syntax
51
52All symbols are @strong{not} case-sensitive.
53
54@{<whiteSpace>@} at the start of the line will be ignored.
55
56All keywords are evaluated as occurring, the first matching
57keyword found is valid. If there are more then one keywords of the
58same type allowed, the @strong{last} line matching the situation is
59valid. Another words: second definition overwrites the previous one.
60If no match is found, a default value will be used.
61
62"#" at the start of a line or <whiteSpace>#<whiteSpace> within the
63line starts a comment. The comment ends with the line. Comment char "#" can
64be overwritten by @code{commentChar} token.
65
66If the first word in a line is an undefined keyword, program exits
67with error message.
68
69Each keyword has to start a new line.
70
71Keyword parameters:
72@table @code
73@item <integer>
74string including integer numbers, like: @code{1234567890}
75@item <string>
76text string, optionally in double quotes.
77@item <bool>
78may be set to "1", "0", "yes", "no", "on", "off", and also without
79parameters (it means "on").
80@item <addr>
81address string like zone:net/node[.point][@@domain]@*
82example: @code{2:5000/117}
83@item <file>
84file name. path can be omitted.
85@item <path>
86only path. trailing slash may be included or not.
87@end table
88
89Note! @code{[<parameter>]} means that it can be omitted.
90
91FIDOCONFIG library can set up internal variables:
92@example
93set basedir=/home/user/fido/
94@end example
95
96@code{[OS]} variable is automatically set up for following operating systems:
97@table @asis
98@item UNIX
99All unix-like OS: Linux, *BSD, BeOS, ...
100@item OS/2
101@item WIN
102@item MSDOS
103
104@end table
105
106You can set something like:
107@example
108if [OS]==UNIX
109tearline `uptime`
110endif
111@end example
112
113Some programs can be compiled with @strong{module} variable. It can be
114used to speed up config parsing:
115
116@example
117if [module]==htick
118include /etc/ftn/fileareas
119endif
120@end example
121
122And if @strong{HPT} is running, fileareas aren't parsed because [module]==hpt.
123
124There are following modules available:
125@table @asis
126@item hpt (Highly Portable Tosser)
127@item htick (Husky Ticker)
128@item hptutil
129@item hpucode
130@end table
131
132Also @strong{external} variables can be parsed:
133@example
134autoexec.bat:
135SET VAR=myvar
136
137fidoconfig:
138if [VAR]==myvar
139...
140else
141...
142endif
143
144ifdef UNIX
145MsgBaseDir  [home]/msgbase
146endif
147@end example
148
149You can use external programs output via @code{`cmd`}. It is available
150only for UNIX & OS/2+EMX:
151@example
152Name Power Station under `uname -mrs`
153@end example
154
155List of the additional commands:@*
156set, if, if not, else, elseif, ifdef, ifndef, endif.@*
157
158You can compare with a pattern by using =~ and !~ instead of == and !=:
159@example
160if [VAR] =~ *substr*
161...
162endif
163if [VAR] !~ bla?bla*
164...
165endif
166@end example
167
168@node Common, HPT, Syntax, config file
169@section Common keywords for HUSKY-programs
170These keywords may be used by several programs. More specific keywords
171you can find in the programs' individual documentations.
172
173@menu
174* version::                     version of fidoconfig
175* name::                        your system name
176* location::                    your location
177* sysop::                       your name
178* include::                     include other files
179* address::                     your system address
180* commentChar::                 Comment character
181
182* Outbound::                    outbound path
183* FileBoxesDir::                directory where fileBoxes of links are created
184* Inbound::                     inbound path
185* tempDir::                     path for temporary files (possible memory disk)
186* logfiledir::                  path for log files
187* syslogfacility::              facility to use for syslogging
188* loglevels::                   sets level of log output
189* ScreenLogLevels::             sets level of log output to screen
190
191* seqdir::                      path for msgid sequence stamp
192* seqoutrun::                   max msgid seq outrun from current time
193
194* pack::                        definition for packer
195* unpack::                      definition for unpacker
196
197* link::                        adding a link to your config
198* linkdefaults::                start/end/destroy link's default definitions
199* aka::                         link's address
200* ouraka::                      our aka for link
201* password::                    link's default password
202* pktpwd::                      pktpassword for this link
203* ticpwd::                      ticker password for this link
204* areafixpwd::                  areafix password for this link
205* filefixpwd::                  filefix password for this link
206* bbspwd::                      bbs password for this link (online user)
207* sessionpwd::                  session password for this link
208* handle::                      nickname or handle for link
209* packer::                      default packer for link
210
211* GrpDesc::                     area group description
212* BadArea::                     definition of badarea
213* DupeArea::                    definition of dupearea
214* EchoArea::                    definition of echoarea
215* NetMailArea::                 definition of netmailarea
216* RobotsArea::                  definition of robotsarea
217* LocalArea::                   definition of the BBS message area
218* FileArea::                    definition of filearea
219* BbsArea::                     definition of the BBS file area
220* ReadOnly::                    set link(s) readonly for area(s)
221* WriteOnly::                   set link(s) writeonly for area(s)
222@end menu
223
224@node HPT, HTick, Common, config file
225@section Highly Portable Tosser keywords
226This section contains keyword-list only. Read HPT Manual for more info.
227
228@example
229@include keywords.hpt
230@end example
231
232
233@node HTick, NLTools, HPT, config file
234@section HTick (Husky Ticker) keywords
235This section contains keyword-list only. Read HTick Manual for more info.
236
237@example
238@include keywords.htick
239@end example
240
241
242@node NLTools, EmailPkt, HTick, config file
243@section NLTools keywords
244
245@menu
246* nodelistdir::                 path for nodelists
247* fidouserlist::                name of compiled fido user list file
248* nodelist::                    adding a nodelist definition
249* diffupdate::                  where nodediffs for this nodelist can be found
250* fullupdate::                  where complete updates for the nodelist are
251* defaultzone::                 specifying a zone number for a nodelist
252* nodelistformat::              is it a nodelist or a pointlist?
253* delapplieddiff::              delete applied nodediff
254@end menu
255
256@node nodelistdir, fidouserlist, NLTools, NLTools
257@subsection nodelistDir
258@table @asis
259@item Syntax:
260@code{nodelistDir <path>}
261@item Example:
262@code{nodelistDir /var/spool/fido/nodelist}
263@end table
264
265This command specifies the path where the actual nodelists are or should
266be written to. This path contains the raw nodelist (@pxref{nodelist}). Also,
267compiled nodelists like the @file{FIDOUSER.LST} will be stored here.
268
269This statement cannot be repeated.
270
271@node fidouserlist, nodelist, nodelistdir, NLTools
272@subsection fidoUserList
273@table @asis
274@item Syntax:
275@code{fidoUserList <filename>}
276@item Example:
277@code{fidoUserList fidouser.lst}
278@end table
279
280If this keyword is present, the nodelist compiler (e.g. @code{ulc}) is
281instructed to build a user list file with the given filename in the nodelist
282directory (@pxref{nodelistdir}). This is a simple text file with fixed line
283length that contains user names (nodes, points) and their corresponding node
284or pointnumbers. The file is sorted alphabetically by user name (case
285insensitive), so that it can be bsearched to implement a quick node numer
286lookup functinality. The fido user list file format is understood by
287@code{msged}, for example.
288
289@node nodelist, diffupdate, fidouserlist, NLTools
290@subsection nodelist
291@table @asis
292@item Syntax:
293@code{Nodelist <name>}
294@item Example:
295@code{Nodelist nodelist} or @code{Nodelist points24}
296@end table
297
298This statement starts a new nodelist definition. All the following
299nodelist-related stamtements change the configuration of this nodelist until
300a new @code{nodelist} statement is found.
301
302The name that you specify must match the base name (without extension and
303without pathname) of the raw, unpacked, nodelist file. The husky tools
304@code{ulc} and @code{nlupdate} math the file name case-insensitively, but
305other tools may need the exact spelling. The raw nodelist file is
306expected to reside in the nodelist directory (@pxref{nodelistdir}).
307
308@node diffupdate, fullupdate, nodelist, NLTools
309@subsection diffupdate
310@table @asis
311@item Syntax:
312@code{DiffUpdate <path_and_basname>}
313@item Example:
314@code{DiffUpdate /var/spool/filebase/nodediff/nodediff}
315@end table
316
317Here you can specify the base filename of nodelist difference files
318(nodediffs) that are used to keep the corresponding nodelist up to date. The
319argument to the DiffUpdate is the full file name with path of a difference
320file, without the file extension. For example, if you have a file area at
321@file{/var/spool/filebase/24000}, where your ticker places the updates for
322the German Pointlist, and those update files are called @file{points24.a26},
323@file{points24.a33}, and so on, you would use
324
325@example
326DiffUpdate /var/spool/filebase/24000/points24
327@end example
328
329The @code{Diffupdate} keyword is used by @code{nlupdate}, for example. The
330nodelist updater will unpack the difference file (if it is archived, of
331course, unpacked diffs are also supported), apply the diff to the
332corresponding nodelist, and delete the temporary unpacked diff again.
333
334
335@node fullupdate, defaultzone, diffupdate, NLTools
336@subsection fullupdate
337@table @asis
338@item Syntax:
339@code{FullUpdate <path_and_basname>}
340@item Example:
341@code{FullUpdate /var/spool/filebase/nodelist/nodelist}
342@end table
343
344This statement works like @code{DiffUpdate} (@pxref{diffupdate}). The
345difference is that here you don't specify the location of a nodelist
346difference file, but the locations where complete nodelist files/archives can
347be found. Some othernets do not (regularly) distribute a nodediff file, but
348just hatch a new nodelist every few weeks. In this case, you need the
349@code{FullUpdate} statement.
350
351@node defaultzone, nodelistformat, fullupdate, NLTools
352@subsection defaultzone
353@table @asis
354@item Syntax:
355@code{DefaultZone <zone>}
356@item Example:
357@code{DefaultZone 2}
358@end table
359
360Some nodelist files do not start with a @samp{Zone} entry. This is the case
361for the German Points24 list, for example, but could also happen for
362othernets that only have one zone. In this case, you can use the
363@code{DefaultZone} keyword to specify the default zone number for all nodes
364listed in this nodelist.
365
366@node nodelistformat, delapplieddiff, defaultzone, NLTools
367@subsection nodelistformat
368@table @asis
369@item Syntax:
370@code{Nodelistformat <format>}
371@item Example:
372@example
373NodelistFormat standard
374NodelistFormat points4d
375NodelistFormat points24
376@end example
377@end table
378
379Here you can specify the format of the unpacked nodelist. The default is
380@samp{standard}; this is the normal Fidonet nodelist format. You can also
381specify @samp{points4d}, which is needed for the nodelist compiler to
382recognise a standart pointlist in 4D format or @samp{points24} for the
383German points24 format as such, so that it can see the proper 5D point
384numbers instead of the fakenet numbers.
385
386@node delapplieddiff, , nodelistformat, NLTools
387@subsection delapplieddiff
388@table @asis
389@item Syntax:
390@code{delAppliedDiff <bool>}
391@item Example:
392@code{delAppliedDiff on} or@code{delAppliedDiff off}
393@end table
394
395NLTools can delete nodediffs after applying them if you set @code{delAppliedDiff} to @code{on}.
396Default is @code{off}
397
398This token can't be repeated.
399
400@node EmailPkt, BSOpack, NLTools, config file
401@section EmailPkt keywords
402
403@menu
404Common tokens:
405* sendMailCmd::                 command line for sending file via e-mail
406
407Link definition tokens:
408* email::                       email address of this link
409* emailSubj::                   subject of email
410* emailFrom::                   sender address used for outgoing emails
411* emailEncoding::               encoding of outgoing emails
412@end menu
413
414
415@node sendMailCmd, email, EmailPkt, EmailPkt
416@subsection sendMailCmd
417@table @asis
418@item Syntax:
419@code{sendMailCmd string}
420@item Example:
421@code{sendMailCmd /usr/sbin/sendmail $a <$f}
422@end table
423
424This keyword is used to define send mail command & its parameters. Macro '$a'
425specifies position of the recipient e-mail address; macro '$f' specifies position
426of name of file with message body. If '$f' is omitted then message body will be
427taken from stdin.
428
429This statement can't be repeated.
430
431
432@node email, emailFrom, sendMailCmd, EmailPkt
433@subsection email
434@table @asis
435@item Syntax:
436@code{email <email-address>}
437@item Example:
438@code{email eddie@@ironmaiden.com}
439@end table
440
441This keyword is used to set the email-address for the link. This can
442be used to send pkts via email.
443
444This statement can only be repeated for different links.
445
446@node emailFrom, emailSubj, email, EmailPkt
447@subsection emailFrom
448@table @asis
449@item Syntax:
450@code{emailFrom <email-address>}
451@item Example:
452@code{emailFrom fred@@ironmaiden.com}
453@end table
454
455This keyword is used to set the email-address used as sender address
456for outgoing emails to this link.
457
458This statement can only be repeated for different links.
459
460@node emailSubj, emailEncoding, emailFrom, EmailPkt
461@subsection emailSubj
462@table @asis
463@item Syntax:
464@code{emailSubj <subject>}
465@item Example:
466@code{emailSubj Fido over EMail message in UUE format}
467@end table
468
469This keyword is used to set the subject for emails to and from this
470link. It may be ignored by some encodings (e.g. SEAT).
471
472This statement can only be repeated for different links.
473
474@node emailEncoding, , emailSubj, EmailPkt
475@subsection emailEncoding
476@table @asis
477@item Syntax:
478@code{emailEncoding (MIME | SEAT | UUE)}
479@item Example:
480@code{emailEncoding MIME}
481@end table
482
483This keyword is used to set the encoding for outgoing emails to this link.
484
485This statement can only be repeated for different links.
486
487
488@node BSOpack, herp, EmailPkt, config file
489@section BSOpack keywords
490This section contains keyword-list only. Read BsoPack Manual for more info.
491
492@example
493@include keywords.bp
494@end example
495
496@node herp, Example, BSOpack, config file
497@section herp keywords
498Herp is the Husky External file Request Processor. The following fidoconfig
499keywords are specific to herp. Some programs of herp, in particular
500@file{herpidx}, also use part of the @file{htick} configuration,
501i.E. filearea definitions.
502
503@menu
504* reqidxdir::                   path for herp request index files
505@end menu
506
507@node reqidxdir,,herp,herp
508@subsection reqidxdir
509@table @asis
510@item Syntax:
511@code{reqidxDir <path>}
512@item Example:
513@code{reqidxDir /var/spool/fido/reqidx}
514@end table
515
516This command specifies a subdirectory which will be used to store the request
517index generated by @file{herpidx}. This subdirectory should be writable for
518the @file{herpidx} process and at least readable for the user under which
519your mailer and @file{herp} will be run. @file{herpidx} will place various
520request index files here. The subdirectory should not be used for any other
521purposes. The index can become rather large, so plan for enough free disk space.
522
523@node Example,  , herp, config file
524@section A working sample config
525@example
526@include config
527@end example
528