Go to the first, previous, next, last section, table of contents.


FIDOGATE Programs

The current FIDOGATE distribution includes the following programs and scripts:

ffx
Remote execution via FIDO mailer
ffxbatch
Remove execution via FIDO mailer - batched
ffxmail
ffx frontend for sending mail
ffxqt
Execute ffx requests
ffxrmail
rmail command for ffxqt
ffxrun
Script for running ffxqt
ftn2ftn
FTN-FTN NetMail gateway
ftn2rfc
FTN-Internet mail/news gateway
ftnaf
Areafix
ftnafmail
Areafix mail frontend
ftnbounce
Bounce mail to unknown FTN address, NOT YET IMPLEMENTED.
ftnbsy
Create/delete Binkley busy files
ftnconfig
Retrieve information from FIDOGATE config files
ftnhatch
Hatch new file into file echo
ftnin
Frontend for ftn2rfc
ftninpost
Mail/news processing script
ftninrecomb
Mail/news recombining script
ftnlock
Create/delete lock files
ftnlog
Write message to log file
ftnpack
Pack (ArcMail) FTN mail packets
ftnroute
Route FTN mail packets
ftnseq
Access sequencer file
ftntick
Process incoming file echos
ftntoss
Toss/remap/rewrite FTN mail packets
ftnfattach
Binkley outbound file attach utility
pktdebug
FTN mail packet debugger
rfc2ftn
Internet-FTN gateway
rundf
Script for checking free disk space
runin
Script for processing inbound packets
runout
Script for processing gateway output packets
runtoss
Script for running tosser
rununpack
Script for unpacking arcmail archives
sumcrc
CRC checksum utility

Almost all FIDOGATE programs support standard options, which aren't listed in the following sections describing the individual programs:

-v --verbose
Increase the verbosity/debug level.
-h --help
Help on usage and options.
-c --config name
Read an alternate config file. "" means none. name may start with %L/, indicating a file relative to LIBDIR.
-L --lib-dir name
Set the FIDOGATE library directory (LIBDIR).
-S --spool-dir name
Set the FIDOGATE spool directory (SPOOLDIR).
-a --addr Z:N/F.P
Set the main address of this system.
-u --uplink-addr Z:N/F.P
Set the uplink address (boss node) of this system.

The option -a and -u also support Internet-style FTN addresses, e.g. p10.f110.n2452.z2. If any of these options is specified, all addresses from the config file are disabled.

All options and config statements which take file or directory names accept the following % abbreviations:

%L
The value of LibDir
%S
The value of SpoolDir
%G
The value of LogDir
%O
The value of Outbound
%I
The value of Inbound
%P
The value of PInbound
%U
The value of UUInbound

ffx -- Remote Execution via FIDO Mailer

Usage:

ffx  [-options]  Z:N/F.P  command

Options:

-b --batch-dir dir
Operate in batch mode, using dir. Control and data files are not immediately appended to the node's FLO file, but rather written to a separate batch directory SPOOLDIR/out.ZZZ/dir. Implies -n.
-B --binkley name
Set Binkley outbound directory.
-F --flavor flavor
Set flavor of outbound FLO file: Hold, Normal, Direct, or Crash.
-g --grade grade
Set grade of control and data files to grade (single letter [a-z0-9]).
-n --nocompression
Don't compress data files.

The compression program (gzip) and other are hardcoded in the ffx.c source code.

ffxbatch -- Batches Remote Executon via FIDO Mailer

Usage:

ffxbatch  [-options]  Z:N/F.P  command

Options:

-b --batch-dir dir
Select batch directory as used by ffx -bdir. The files in this directory will be archived and transfered as a single ffx command.
-B --binkley name
Set Binkley outbound directory.
-F --flavor flavor
Set flavor of outbound FLO file: Hold, Normal, Direct, or Crash.
-g --grade grade
Set grade of control and data files to grade (single letter [a-z0-9]).
-w --wait-bsy
Wait, if busy file for the node exists. Default: terminate, don't archive batched ffx-Jobs.

The name of the archiving program (zip) is hardcoded in the ffxbatch.c source.

ffxmail -- ffx Frontend for Sending Mail

Usage:

ffxmail  Z:N/F.P  address ...

No options.

ffxmail calls ffx in batch mode (-b), selecting the batch directory from the node address. Modify the script (src/ffxmail.sh) for other addresses/batch directories.

ffxqt -- Execute ffx Requests

Usage:

ffxqt  [-options]

Options:

-g --grade grade
Process ffx jobs with grade only. grade must be a single letter.
-I --inbound name
Select the input directory where the f???????.ffx control files are read from. Default: INBOUND
-t --insecure
Process ffx files without password. Default: ffx file must contain a password.

ffxqt searches the input directory for control files and executes the requested commands. Commands are executed by running LIBDIR/ffxqt-dir/command, so every allowed command must reside as a script or symbolic link there.

Some program/paths are hard coded in the ffxqt.c code.

ffxrmail -- Script for Processing FFX rmail Commands

Usage:

ffxrun  [-v]

Perl script to be called as rmail by ffxqt. This replaces /bin/rmail (UUCP), calling /usr/lib/sendmail directly with appropiate options.

Installed as LIBDIR/ffxqt-dir/rmail.

ffxrun -- Script for Running ffxqt

Usage:

ffxrun  [ffxqt options]

This script runs ffxqt twice (the second run for processing batch archives unpacked by the first one). All command line arguments are passed to ffxqt.

ftn2ftn -- FTN-FTN NetMail Gateway

Usage:

ftn2ftn  [-options]  [packet ... ]

Options:

-A --address-a Z:N/F.P
Set FTN address in network A.
-B --address-b Z:N/F.P
Set FTN address in network B.
-o --out-packet-file NAME
Set output packet file name.
-O --out-packet-dir NAME
Set output packet directory.

This program provides a NetMail gateway between different FTNs, using the (somewhat) standard "User Name%Z:N/F.P" addressing in the FTN from and to fields.

If no packet is given on the command line, ftn2ftn looks for packets addressed to the gateway addresses (A and B) in the Binkley outbound. Both gateway addresses must be specified with the -A and -B options.

If a packet name is passed on the command line, ftn2ftn will gate this to the other network A. The gateway address (sender of the mails in network A) is set with -A option.

ftn2rfc -- FTN-Internet Gateway

Usage:

ftn2rfc  [-options]  [packet ... ]

Options:

-1 --single-articles
Write single articles to output files (in tmpnews), not news batches containing several articles (batch is default).
-t --insecure
Operate in insecure mode. All messages containing a To line for gateway addressing will be bounced. Also sets the input directory to SPOOLDIR/insecure.
-I --inbound-dir NAME
Set the input directory for FTN packets.
-l --lock-file
Create lock file while processing.
-x --exec-program SCRIPT
Run SCRIPT after processing all FTN packets. Typically this is %L/ftninpost.

ftn2rfc reads packet files from the input directory or the command line and converts the FTN packets to Internet RFC mail and news, written as mail files and news batches to the directories SPOOLDIR/in/mail and SPOOLDIR/in/news, respectively.

ftnaf -- Areafix

Usage:

ftnaf  [-options]  [Z:N/F.P  command ]

Options:

-m --mail
Process Areafix mail message (RFC) on stdin.
-r --no-reply
Don't send reply via mail, write to stdout.
-n --no-rewrite
Don't rewrite AREAS.BBS.
-b --areas-bbs NAME
Use alternate AREAS.BBS.
-F --filefix
Run as Filefix program, using FAREAS.BBS.

Commands:

listall
List all areas.
list
List areas available to node.
query
List subscribed areas.
unlinked
List unsubscribed areas.
passwd Z:N/F.P PASSWORD
password Z:N/F.P PASSWORD
pass Z:N/F.P PASSWORD
Set address and password.
add AREA
+AREA
AREA
Subscribe to AREA.
remove AREA
delete AREA
del AREA
-AREA
Unsubscribe from AREA.
help
Help on Areafix commands.

All command keywords may be prefixed by %. ftnaf also recognizes the -q (= query) and -l (= list) options following the password in the subject header.

For proper operation ftnaf requires the X-FTN-From header generated by ftn2rfc (see config.h configuration).

ftnafmail -- Areafix Mail Frontend

Usage:

ftnafmail  [-options]

Options:

-F --filefix
Run ftnaf as Filefix program.

This is the setuid mail frontend for ftnaf to be run from the sendmail aliases:

# Areafix/Filefix - FIDOGATE ftnaf
areafix: "|/usr/local/lib/fidogate/ftnafmail"
areamgr: areafix
filefix: "|/usr/local/lib/fidogate/ftnafmail -F"
filemgr: filefix

ftnbounce -- Bounce Mail to Unknown Addresses

Usage:

ftnbounce  [-options]  [packet ... ]

Options:

NOT YET IMPLEMENTED. (Only program skeleton is there.)

ftnbsy -- Create/delete Binkley Busy Filess

Usage:

ftnbsy  [-options]  Z:N/F.P ...

Options:

-t --test
Test for existing busy file.
-l --lock
Create busy file, fail if it already exists.
-u --unlock
Remove busy file.
-w --wait
Wait for busy file to be released (when -l option is given).

ftnconfig -- Retrieve information from FIDOGATE config files

Usage:

ftnconfig  [-options]  parameter

Options:

-l --no-newline
No output of newline after the parameter value.
-n --no-output
No output, exit code only.
-t --test-only
Output 1 if the parameter is present, 0 if not.

Special parameters:

=fqdn
Fully qualified domain name.
=hostname
Hostname.
=domainname
Domainname.
=hostsdomain
Domain for entries in hosts config files.

ftnhatch -- Hatch new file into file echo

Usage:

ftnhatch  [-options]  area  file  "description"

Options:

-b --fareas-bbs NAME
Use alternate FAREAS.BBS.

ftnin -- Frontend for ftn2rfc

Usage:

ftnin  [-options]

Options:

-n --no-toss
Don't call ftn2rfc for processing.
-x --exec-program SCRIPT
Execute SCRIPT after ftn2rfc processing, typically %L/ftninpost.

All standard options are passed to the called ftn2rfc.

ftnin looks for mail packets addressed to the gateway addresses (all Address statements in config) and calls ftn2rfc for each packet.

ftninpost -- Mail/News Processing Script

Usage:

ftninpost  [-options]

This script is run by ftn2rfc or ftnin, feeding the output in SPOOLDIR/in/mail and SPOOLDIR/in/news to sendmail and rnews, respectively.

ftninrecomb -- Mail/News Recombining Script

Usage:

ftninrecomb  [-options]

If FTNInRecombine is enabled in config.gate, this script wil be run by ftninpost to recombine split messages.

ftnlock -- Create/Remove Lock Files

Usage:

ftnlock  [-options]  [NAME]  [ID]

Options:

-l --lock
Create lock file NAME, fail if it already exists (exit code=2). If NAME is not specified, the default ftnlock is used. The optional parameter ID specifies the contents of the lock file, the default is -none-.
-u --unlock
Remove lock file NAME.
-w --wait
Wait while creating lock file. Default: immediately return, if the lock file can't be created because it already exists.

Lock files are created as SPOOLDIR/locks/NAME.

ftnlog -- Write Message to Log File

Usage:

ftnlog  [-options]  message text

Options:

-p --program NAME
Set program name for logging.

This program is used to write a log message from a shell script. The log file name may be specified with the LOGFILE environment variable.

ftnpack -- Pack FTN ArcMail Packets

Usage:

ftnpack  [-options]  [packet ... ]

Options:

-B --binkley dir
Set Binkley outbound directory.
-f --ffx Z:N/F.P
Pack ffx control and data files for FTN address Z:N/F.P. You must also set the appropiate input directory with the -I option.
-F --file-dir dir
Sets directory, where ftnpack looks for file attachments. Should be the appropiate inbound directory, see also the runtoss script. If this option is not specified, no file attachments are processed. If -F / is specified, ftnpack accepts a complete path name in the subject and doesn't search the directory. Warning: this option compromises security to some degree, because it allows any user to send any file readable by the user id running the tosser and mailer!!!
-g --grade grade
Only process packets with grade (single letter).
-I --in-dir dir
Set input directory. Default: SPOOLDIR/toss/out
-O --out-dir dir
Set directory for temporary packets. Default: SPOOLDIR/toss/pack. This is the directory, where packets to be put into arcmail archives will be created.
-l --lock-file
Create lock file while processing.
-m --maxarc size
Set maximum size of an archive to size KByte. If an existing ArcMail archive exceeds this size, ftnpack creates a new one.
-p --packing-file name
Read alternate packing config file. Default: LIBDIR/packing
-P --pkt
Process *.pkt files in the input directory. Default: output files of ftnroute.

ftnroute -- Route FTN Mail Packets

Usage:

ftnroute  [-options]  [packet ... ]

Options:

-g --grade grade
Only process packets with grade (single letter).
-I --in-dir name
Set input directory. Default: SPOOLDIR/toss/tmp
-O --out-dir name
Set output directory. Default: SPOOLDIR/toss/out
-l --lock-file
Create lock file while processing.
-r --routing-file name
Read alternate routing config file. Default: LIBDIR/routing
-M --maxopen n
Set maximum number of concurrently open packet filess to n. Default: 10 (MAXOPENFILES from config.h)

ftnseq -- Command Line Interface to Sequencer Files

Usage:

ftnseq  [-options]  sequencer

This utilitity increments the named sequencer file outputs the resulting value to standard output. Useful for accessing FIDOGATE sequencer files from perl and shell scripts.

ftntick -- Process incoming file echos

Usage:

ftntick  [-options]

Options:

-b --fareas-bbs file
Use alternate FAREAS.BBS.
-I --inbound dir
Use alternate inbound directory.
-t --insecure
Insecure processing, do TIC files without password.

ftntoss -- Toss FTN Mail Packets

Usage:

ftntoss  [-options]  [packet ... ]

Options:

-g --grade grade
Only process packets with grade (single letter).
-I --in-dir name
Set input directory. Default: SPOOLDIR/toss/in
-O --out-dir name
Set output directory. Default: SPOOLDIR/toss/tmp
-l --lock-file
Create lock file while processing.
-t --insecure
Insecure EchoMail tossing, don't check sender against nodes listed in AREAS.BBS.
-n --toss-all
Toss all EchoMail, even messages not addressed to one of our own AKAs (most probably routed EchoMail).
-n --passthru
Make all areas passthru (see also # in areas.bbs).
-r --routing-file name
Read alternate routing config file. Default: LIBDIR/routing
-s --strip-attribute
Strip Hold and Crash attribute from incoming NetMails.
-m --maxmsg n
Flush/close all output packet files after reading n messages.
-x --maxmsg-exit n
Flush/close all output packet files after reading n messages and processing the current input packet, then exit.
-M --maxopen n
Set maximum number of concurrently open packet filess to n. Default: 10 (MAXOPENFILES from config.h)

ftnfattach -- Outbound file attaches

Usage:

ftnfattach  [-options]  Z:N/F.P  file ...

Options:

-B --binkley name
Set Binkley outbound directory.
-F --flavor name
Set flavor of outbound FLO file to name: Hold, Normal, Direct, or Crash.

The file name may start with ^ or #, indicating that the file should be deleted or truncated, respectively, after sending.

pktdebug -- FTN mail packet debugger

Usage:

pktdebug  [-options]  file ...

Options (standard options not supported):

-m --msg-header
Print message header.
-t --msg-text
Print message text. Implies -m.
-v --verbose
Increase verbose/debug level.
-h --help
Help on pktdebug usage.

This utility displays the packet header and optionally the message header and message body contents.

See also the util/pktmore utitility, which pipes the output of pktdebug to $PAGER.

rfc2ftn -- Internet-FTN Gateway

Usage:

rfc2ftn  [-options]  [address ...]

Options:

-b --news-batch
Process news batch (implies -n).
-B --binkley name
Set Binkley outbound directory.
-i --ignore-registration
Do not bounce mail to FTN nodes not registered in HOSTS (if HOSTS_RESTRICTED in config.h is enabled).
-n --news-mode
Process news message in stdin. Default: mail
-o --out-packet-file name
Write output to FTN packet file name.
-O --out-packet-dir name
Set output directory for FTN packets. Default: SPOOLDIR/out
-t --to
Get recipient addresses from To, Cc, Bcc headers instead of command line.
-w --write-outbound flav
Write output directly to Binkley .?UT packets in outbound.
-W --write-crash
Write only crash mail directly to Binkley .CUT file.

rundf -- Script for Checking Free Disk Space

Usage:

rundf  dir

No options.

This shell script returns the free disk space (kB) of the file system containing dir. It is called by runtoss for the directories OUTBOUND and SPOOLDIR.

As distributed with FIDOGATE this script requires df from the GNU file utilities. If you don't have this one, you must adapt src/rundf.sh to the output of your df.

runin -- Script for Processing Inbound Packets

Usage:

runin

No options.

Runs the tosser for the inbound directories:

All log messages are written to LIBDIR/log-in.

Edit this script (src/runin.sh) to meet your local requirements.

runout -- Script for Processing Gateway Output Packets

Usage:

runout

No options.

Runs the tosser for the gateway output directory, all log messages are written to LIBDIR/log-out.

Edit this script (src/runout.sh) to meet your local requirements.

runtoss -- Script for Running Tosser

Usage:

runtoss  type

No options.

Types:

normal
Default processing (input SPOOLDIR/toss/in).
out
Process output of rfc2ftn (input SPOOLDIR/out).
pin
Process protected inbound (input PINBOUND).
in
Process insecure inbound (input INBOUND).

Edit the script (src/runtoss.sh) for configuration options: maximum number of open files, maximum number of messages, maximum archive size, minimum free disk space.

rununpack -- Script for Unpacking ArcMail Archives

Usage:

rununpack  type

No options.

Types:

pin
Process protected inbound (input PINBOUND).
in
Process insecure inbound (input INBOUND).

It requires the file command and the following definitions in LIBDIR/magic to work properly (done by make install):

# ----- Archiver ----------------------------------
0       string          PK              ZIP Archive
0       byte            0x1a            ARC Archive
2       string          -lh             LHA Archive
0       string          ZOO             ZOO Archive
0       short           0xea60          ARJ Archive
0       short           0x60ea          ARJ Archive

Edit the script (src/rununpack.sh) if necessary, changing unpacker names. The required programs are unzip, unarj, lha(rc), zoo, arc.

sumcrc -- CRC Checksum Utility

Usage:

sumcrc  [-options]  file ...

Options (standard options not supported):

-1 --skip-first-line
Skip first line in file. Useful for computing nodelist CRC.
-3 --crc32
Compute 32 bit CRC checksum, using the standard 32 bit polynomial (same as in ZModem, ZIP). Default: 16 bit CRC CCITT polynomial.
-6 --crc16
Use alternate 16 bit CRC16 polynomial.
-x --hex
Output CRC value in hex. Default: decimal
-z --eof-at-ctrl-z
The Ctrl-Z character (^Z) indicates end-of-file (MSDOS kludge).
-v --verbose
Increase verbose/debug level.
-h --help
Help on sumcrc usage.

Use sumcrc -1z to compute the checksum for a standard FIDO nodelist.


Go to the first, previous, next, last section, table of contents.