this is a netmail router written on C and utilising TCL as scripting
language.
That means that routing rules are written on TCL, the REAL, the COOL and
the POWERFUL languague, no kidding.
It should run on Unicses (developed under OpenBSD and Linux), it should run on OS/2 (with the limitations of current TCL ports - but I do think TCL 7.6 will still be useable (well, limited, no matter)) - I'll provide OS/2 port and binaries myself; it should be easy to compile on BeOS and even W32 (but I'll not apply any W32 specific stuff!)
LICENCE: Public Domain software.
AUTHOR: Dmitry the Zuryanovich, 2:5020/730.0 dtz@XEPb.ru
HOMEPAGE: http://XEPb.ru/dtz (my personal homepage,select programs
section)
uses some code from DummyTosser (c) me.
Well, I assume you've compiled it - so listen here. (if not - check the Makefile: change -I -L for tcl includes and -ltcl)
First, several definitions. FTN address in this document referrs *strictly* to 4D addressing. It means not 2:5020/730, but 2:5020/730.0
When starting up, it reads config file, which must be passed as the only parameter to binary file. This is, as you could guess, a plain TCL script.
You can do anything you like there, 'puts "Fuck a duck"' even, but do not forget to set the following variables:
set Netmail "/usr/local/fido/netmail"
set Fein "2:5020/730.1"
set Outbound "/usr/local/fido/out"
set RouteScript "/usr/local/etc/route.tcl"
Netmail is where to scan yours' MSG netmail area;
Fein (Gaelic//Irish for Me Myself (no direct analogue in English,
in russian - "Nu taki ya B HATYPE")) is your primary FidoNet address.
Outbound is where messages will be stored in .pkt's while Ftn_Route
RouteScript is the script to be call for all the messages in your's
netmail dir.
Never change Netmail and RouteScript. You can change
Fein and Outbound in routing script (useful for 5D addresing,
which is not directly supported)
Hint: do not forget to change it back ;-)
Then, when config is read and all the global variables are defined, for each the messages the RouteScript script is ran.
It comes with variables defined in config (if you dont modify them earliar when RouteScript runs for the prevouse time) plus with several variables regarding to the so-called Current Message.
It can do anything - load packages to utilise SQL databases, (well, if
you do this - load them in config for sure!) 'puts "Fuck $Ftn_From"', almost
anything, except one general rule: All the variables MUST be defined while
running the script. It means, do not do
unset Msg_Text
It can cause a core dump, I warn you!
And this software provides you some specific TCL FTN API, which you can apply after checking the FTN-specific conditions.
The defined actions are:
Ftn_Route ViaNode Flavour [pktpassword]
Stores in binkley-style outbound, creating .pkt file and attaching it to
?lo. Note: not like regular netmail in ?ut, at least, for now (or may be
not? I do not know for now ;-))
pktpassword is optional
Returns:
1 if nothing is routed because of bsy
0 if routed
Drops a error if some serious problem. Use catch.
Ftn_Store [path]
Stores the message
If the optional argument is given and it is file, stores message there.
If the optional argument is given and it is directory, treats the directory
as netmail folder and stores .msg there
If not, overrides the current message.
Returns:
0 if stored
Drops a error if serious problem. Use catch.
Here is the complete list of avaluable variables.
The defined Message attributes are: | |
---|---|
Msg_From | š |
Msg_To | š |
Msg_Subj | š |
Msg_Text | with all the cludjes, sure |
Msg_Date | as in date field in stored message |
Msg_Origin | not --Origin: line, but source FTN 4D address |
Msg_Destination | FTN 4D destination |
Msg_Attribute_Private | Note! All them must be defined and be equial ONLY to 0 or 1. I warn, once again |
Msg_Attribute_Crash | š |
Msg_Attribute_Recd | š |
Msg_Attribute_Sent | š |
Msg_Attribute_FileAttached | š |
Msg_Attribute_InTransit | š |
Msg_Attribute_Orphan | š |
Msg_Attribute_KillSent | š |
Msg_Attribute_Local | š |
Msg_Attribute_HoldForPickup | š |
Msg_Attribute_unused | š |
Msg_Attribute_FileRequest | š |
Msg_Attribute_ReturnReceiptRequest | š |
Msg_Attribute_IsReturnReceipt | š |
Msg_Attribute_AuditRequest | š |
Msg_Attribute_FileUpdateReq | š |