copyright (c) 1997-2011, Stas Mehanoshin
FIDO: | 2:5030/172.9 |
email: | rampitec@gmail.com |
The latest version of the program is available here:
BMP has to be used to process the netmail and prepare it to be sent by the Binkley-compatible mailer.
The main features:
BMP is freeware. You can use it yourself or give to the other person for a non-commercial use as long as the archive and the program enclosed will not be modified in any way and this copyright notice will be untouched.
Author makes no responsibility for the program's behavior; use it on your own risk. Still I'll be glad to see your comments and bug reports.
If you wish to support the author and further development you may donate via WebMoney or Yandex.Money:
Yandex.Money account (41001201028497) | WebMoney accounts | |||||||||||
|
|
BMP [/cCfg-file] [/pmd] [/dVariable1[=Value1] [/dVariable2[=Value2] ...]]
{
[/a] [/r] [PAck [["]compound mask["]]] |
POll [<Flavor>] <Addresses> |
Send [<Flavor>] [{Kfs|Tfs}] [Msg] [Box] <Addresses> <Files> |
Get [<Flavor>] [Msg] <Addresses> <File requests> |
Repack [["]compound mask["]]
Unpack [Keep] [["]compound mask["]]
}
<Flavor> | ::== | {[Normal]|Crash|Immediate|Direct|Hold} |
<Addresses> | ::== | Address[, Address...] |
<Files> | ::== | File [, File ...] |
<File Requests> | ::== | [:]File[ !Password] [, [:]File[ !Password] ...] |
When BMP started without /c parameter it will try to find the file BMP.CFG in the exe-file directory to use as the configuration file. If the optional /c parameter present the file supplied at the command line will be used instead.
Qualifier /pmd tells to create the post-mortem-dump. If the program will be terminated with GPF you have to use this option and send the resulting bmp*.pmd file along with everything else needed to diagnose problem to me. See also configuration parameter CriticalHandler. When the command line option /pmd is used the post-mortem-dump will be generated in any way upon the program termination.
Qualifier /d has to be used to set the variables. I.e.: bmp32 /dLine=1 /cmain.cfg /ddummy pack will create the variable Line which has the value 1 and the dummy without a value.
You have to quote unprintable symbols and blank spaces in the file names. For example:
bmp /c"My Configuration" S I 2:5030/172 "My File"
You have to double the quote to use the quote itself: "file with quota ("")"
It is allowed to use incomplete commands supplying just the minimum enough to dispatch the context. For example one can use bmp Po... instead of bmp Poll... or bmp S K... instead of bmp Send Kfs...).
If some fields are omitted in the comma-delimited address list these fields are taken from the previous address in list. For example:
2:5030/172.9, .0, 10/1, /2 means: 2:5030/172.9, 2:5030/172, 2:10/1, 2:10/2
The first address used at the command line has to be fully qualified, since the configuration file is not known at its parse time, so the primary address is not known too.
You can use response-files. Use the '$' or '@' symbol in from of such file name. Response-file content will be substituted to the command line. The '$' symbols assumed to be used for comma-separated values (value is a file string), such as node and file lists, while '@' symbol has to be used for the space delimited values. Quote names with such symbols to use it verbatim.
For example file names.lst contains the strings:
file1 file2 file3
nodes.lst:
2:5030/172 /143
and todo.rsp:
get imm
Than the command
bmp @todo.rsp $nodes.lst $names.lst, "$file"
is equivalent to:
bmp get imm 2:5030/172, /143 file1, file2, file3, "$file"
The Pack command is used by default and has no parameters. BMP makes netmail scan and pack.
/a qualifier used to ignore the lastreads so the full netmail bases scan takes place.
Qualifier /r allows repack of the previously packed mail before the mail pack loop during the Pack command. See Repack command for more details.
Sample: bmp /cMyConfig.cfg Pack
If an address mask specified after the Pack command only messages satisfied the mask would be packed. For example:
bmp /a pack "^KnownTime & ^Published & 2:*"
I.e. to pack only the messages that will go through the published node with known working time and which are addressed to the zone 2. Remember the symbols ^, | and & might be recognized by your command interpreter as a special command delimiter symbols (that is more than possible). Enclose the complete mask into quotes to avoid this. Remember you can use plus symbols instead of ampersand and command in place of pipe.
When packing the messages with address mask specified bmp does not store lastreads since not all message might be packed as is the command specified alone. It is using lastreads however if they were stored previously, i.e. /a qualifier might be useful if this situation too.
Send command sends files to the addresses specified. Addresses have to be listed divided by commas. Files a listed as a comma-delimited list in the last parameter. Just after the Send work (before the addresses list) an optional parameter can be used to set the attach flavor. Default flavor is Norm. Then the option parameter KFS or TFS can be specified which means Kill File Send and Truncate File Sent respectively.
Msg modifier, specified just before the addresses list, orders not to generate the direct attach but the attach with a message to be sent as specified by the Route-file' directives. These messages are controlled by all the routing rules, including Encode-Files. See also CmdSendTemplate.
Box modifier usage forces bmp to send files using file boxes if there is a filebox for the given address or if there are globally specified fileboxes exists.
Wildcards are allowed if the file's names.
Sample: bmp Send Hold KFS 2:5030/172, 2:5030/143 file1, file2
Get command is to be used to create file requests. If the flavor parameter is specified the corresponding poll is also generated for that address. Request password can be set after each file with blank and '!' symbol placed after the file name. If you put the symbol ':' just before the file name file update request is generated. Files to be updated are searched in Inbound firstly and then at FilePath.
Msg modifier can be used just before the addresses list to create a request message instead of *.req file directly. That message is packed according to the Route-Freqs rules of your routing. See also CmdGetTemplate.
Sample: bmp Get Imm 2:5030/172, 2:5030/143 :xxx.fil !MyPassword, files
Poll command used to create the poll for the addresses specified. Norm is the default flavor.
Sample: bmp Poll 2:5030/172
Repack command is used to repack the BSO contents, i.e. already packed mail. That is possible to repack the messages without freqs and attaches. That means you can repack regular netmail only.
Secondary packing uses the routing rules, which are working at the repack moment. Routing can be changed due to several reasons. Those are manual configuration file's change or the dynamic configuration properties. The late are Online address mask qualifier or preprocessor commands #ifcron. Additional routing change reason can be a changed nodelist.
If the messages has to go to the same address as it was before repack does not take place even if other routing parameters were changed (i.e. flavor were changed).
Repack command can be followed by the addresses mask just like the Pack) command. If so repack is made only for that messages satisfied the mask. The only difference is VIA address (to which mail is packed now) assumed to be the address to which it was packed previously (not to which is has be packed) during a compound mask analysis.
Repack can also take place during the normal mail packing with a Pack command if /r options is used and some additional conditions met. Those conditions are described in the configuration file. See RepackOnFlag, RepackOnChange, RepackAt and RepackEvery for conditions. You may find the RepackOnChange condition useful to be set to a nodelist or a dedicated routing file change. Remember the /r option specification alone is not enough for repack with the Pack command!
See also KeepPollOnRepack.
Unpack command unpacks the packets from BSO. As well as with repack only messages without freqs and attaches are to be unpacked. Directive UnpackArea from Netmail section of the configuration file sets the netmail area to the target of unpack operation.
Please note that the messages created by bmp itself will be also unpacked! For example that is the messages created by bmp using ArqTemplate or uue encoded attaches (whose status becomes not an attach after encoding).
As a result of attribute stripping during pack operation (such as Crash, Hold etc.) those attributes are restored from the packet flavor can not to be the same as original (for example as a result of Flavour-Kludge).
The only change bmp does to the unpacked message is removal of via kludge set by bmp itself during pack operation.
In other words unpacked netmail is not necessarily the same it was before pack. Instead it is the same to that would be sent. So if you have in mind to unpack messages by scheduler and pack it back automatically - think twice ;-)
One can use keyword Keep just after the Unpack clause to unpack the messages to netmail without removal from BSO.
As well as with Repack command, an address mask can follow Unpack. Only messages matches the mask will be unpacked. VIA address is considered to be that to which the message was packed before, similar to Repack.
Configuration file consists of four sections that can follow in any order. BMP will scan only these sections, known to program. Section started with a name enclosed into brackets.
List of configuration file sections:
Comments starts from semicolon (;) and ends et the end of line.
One can use abbreviated (shorten) directives in the context of the section. Shorten directives uses the minimum context required to recognize the keyword.
There is also the configuration file preprocessor.
The full 4D system address or 3D node address with default field Point equal to 0.
That is possible to use a short address format. I.e.: 2:5030/172.9 = 5030/172.9 = /172.9 = .9, if that is the main address. Omitted fields except for the point are taken from the main AKA. Exception is the command line (or any address list separated by commas in general; right now is used only for command line), where omitted fields are taken from the previous address in the list.
Address mask is used to be a wildcard specification for the addresses. Address match to a mask is done in the following way:
A list of wildcard allowed in masks:
Symbol | Translation |
* |
Match to the end of line |
? |
Match one character |
# |
Match from the current parse point to the end of field (zone, net, node or point), i.e. to the first non-digit character or to the end of line |
Matching is done to the character representation of the full 4D address. I.e. address 2:5030/172 will use the string "2:5030/172.0" for matching purposes. There is a match if the address string and the mask are simultaneously exhausted and there is no mismatch.
String representation means there is no address division to the fields. One can get such impression looking to the mask #, still it just matches all digit symbols. For example the mask '2:503???7*' and the string '2:5030/172.9' are matches.
Mask # has to be used for special purposes, i.e. to select the hosts only (mask "#:#/0.0").
Masks can use the shorten format. Shorten mask are always completed according to the main AKA. You can shorten the mask if the first mask symbol is '/' or '.'. Then the zone, net and node (for '.') are taken from the main AKA. Zone can be also completed if there is a '/' symbol in the mask but no ':'. Some examples of correctly shorten masks:
5030/*, /172.2#, .12, .0
Special keyword for nodelist compare are also can be used as a valid masks. To you use that possibility specify version7 or version7+ parameters of General section of the configuration file. Valid keywords are:
Mask | Translation |
CM | node with CM flag |
Listed |
any listed in nodelist node |
Published | any node with known phone number |
Protected | Node with known session password. Password has to be specified when compiling V7(+) index |
KnownTime | node with known working time (either CM, or having Txy flag). Txy information exists only in v7+ index. For v7 index KnownTime is equivalent to CM! |
Online | node accepting calls right now (implies KnownTime) |
Gate | Address must be listed as a gate. For outgoing masks (to and via) destination name is checked, for incoming (from) - from field name. That must be either gate name specified as Gate for the corresponding address or the name containing the '@' symbol (internet name) |
Raw:<RawType> |
Node RawType, i.e. what is written just before the address in the nodelist (prefixes such as Hub, Point, Host, Region and Hold). For those prefixes case-insensitive match against the mask has to be done. One should remember FastList does not include nodes with RawType Down to indexes. RawType analysis is only possible with V7+ index. |
By default comparison is made against the message destination address (to). If you need to set a condition for the originating address (from) then preface the mask with minus sign ('-'). For example: -2:5030/*. If you need to use address through which the message has to be routed (route via) use symbol '^' in front of mask. For example: ^2:5030/*. Via address will be the same as the destination if the mail is sent directly.
Those symbols are the parts of a mask! Logical conditions described below must be used for the mask at whole. For example correct form is !-2:5030/* and not -!2:5030/*.
Address modifier in brackets can follow this symbol. Possible modifiers are:
[Boss] | Point field of address being compared will be zeroed. Point addresses will result to their bosses, other addresses will be untouched. |
[Hub] | Address will be changed to its hub's address. Net, region of zone host of the system, located not under a hub but under a host, region or zone, is also uses this modifier. |
[Host] | Point and node fields are zeroed. |
Sample: -[Boss]Listed means the message originating system listed in the nodelist, if that is a node, or has a listed boss, if that is a point. Without '[Boss]' such a point will fail the match. On the other hand a point listed in pointlist but having unlisted in nodelist boss would fail the match.
Compound mask consists of several simple masks and act as a logical expression. Several parts of mask can be delimited with '&' or '+' to be concatenated with 'and' condition. Symbols ',' or '|' sets 'or' condition. Any part of mask can be prefaced with '!' symbol to set negative condition. Formal logic operation precedence rules are applied, that is in decreasing order: "not" (!), "and" (&), "or" (|). Conditions can be grouped with parenthesis. For example:
!2:* | Any address not in the zone 2, |
!2:5030/* & !135:* | Any address not in the zone 135 and not in the net 2:5030 |
(2:5030/#+!Raw:Hold+CM, Protected + (CM|2:5030/143.*)) & -Listed | All nodes of the net 2:5030 those are not hold and working CM or any system with Protected status which is either CM or /143.*. In any way originating address must be listed in nodelist. |
One can use the included program TestMask to test compound masks. Syntax is:
TestMask <sender address> <destination address> <via address> <compound mask>
Sample:
TestMask 2:5030/172.9 2:5030/82 2:5030/172 -Raw:Point & ^2:*
To use nodelist file bmp.cfg should be located in the current directory and contain version7(+) definition. TestMask does not support preprocessor.
NB: When working under 4dos and Cmd remember that the symbols used in a mask can be special symbols of command processor. You can use '+' instead of '&' and ',' instead of '|'. To use other symbols either read documentation for you command interpreter or use command.com.
Sets the current message flags. Allowed flags are C for Crash, D for Direct, I for Immediate and F,N or O for Normal. For example, CDI means Crash or Direct or Immediate. Use minus (-) to denote the empty list.
Some command (whenever that has the sense) can use hex, octal or binary number format instead of decimal. For example number 16 can be represented as:
0x10 - hex
020 - octal
0x10000 - binary
String parameters with blank spaces and other "incorrect" symbols have to be enclosed into quotes. To use the quote symbol inside of the string double it. That is right for file names and string command arguments. Arguments of the FilePath and Inbound commands must be quoted if it contains a semicolon. Otherwise it will be interpreted as a comment start. Sample:
"File name with a spaces. ""and a quote in the extension"""
Cron is a time interval representation widely used among schedulers. Cron format realization in the BMP looks like:
<minute> <hour> <day> <month> <year> <weekday> [UTC]
where every field is either * (i.e. all possible values) or a list of number or number intervals. Asterisks at the end of expression can be omitted. Sample:
1-15,20-30,59 15 * 1
this cron means: at the 1st month (January), its any day (*), at 15 o'clock, if minutes are in the range from 1 to 15 or from 20 to 30 or at 59 minutes.
Allowed values range:
minute | 0-59 |
hour | 0-23 |
day | 1-31 |
month | 1-12 |
weekday | 0-7 (0 and 7 both means Sunday) |
UTC at the end of cron condition directs to use Greenwich Time instead of local time.
Configuration file can have substitutions. String enclosed into '%' symbols will be changed to the corresponding environment variable. Sample: %PATH%. To use '%' symbol literally use "%%".
There are several predefined variables:
BMP_OS - operating system for which BMP was compiled.
Values: DOS, WIN, OS2, LNX, OSX.
BMP_COMMAND - command currently processing by BMP.
Values: PACK, POLL, SEND, GET, REPACK, UNPACK.
BMP_DIR - BMP directory (without a trailing slash).
BMP_CFG_DIR - BMP configuration file directory.
UNIX - defined under Linux and Mac OS/X, values are LNX and OSX.
Variables can defined with directive
#define variable-name value
or using /d qualifier from the command line. These variables take precedence before the environment variables.
Variables created using #define keyword or /d qualifier can be freed by the directive
#undef variable-name
discovering the corresponding environment variable.
Preprocessor allows to doing the conditional configuration file translation using the directives of group #if..., described below. The common syntax used by this group is:
#if<condition type> <condition> command-1 command-2 #else if<condition type> <condition> command-3 command-4 #else if<condition type> <condition> command-5 command-6 #else command-7 command-8 #endif
The block should be closed with #endif. That is allowed (but not necessary) to use #else. New if with another condition can follow #else and this construction can be repeated, working as a switch. After the last #else additional condition can be omitted i.e. lines from such an #else till #endif will be used if no condition is matched.
#ifdef used to translate the configuration file depending on the fact that some variable were defined. Block of lines will be used is such a variable exists. Directive #ifndef denotes the opposite condition.
#ifdef variable-name
#ifeq compares two strings and translates the block is they are equal. Using #ifneq employs the opposite condition.
#ifeq string-1 string-2
Sample:
#ifeq [%VAR%] [True] ... #endif
block will be used if and only if VAR variable has the value True. All comparisons are case insensitive.
#ifcron translates the part of the configuration file only at the time given (relative to the bmp start time). Syntax:
#ifcron <cron>
Sample:
#ifcron * 2-3 utc Direct-Mail 2:5030/#.0 #endif
This will allow direct routing inside the net only from 2AM till 3AM Greenwich Mean Time.
NB: when using UTC representation the time zone, set in the configuration file, can not be used by preprocessor before it will meet it. Till that moment system time zone information will be used!
Directive
#include filename
will include corresponding file into parsing.
Echo ["]<string>["]
Special Echo command is allowed in any section but should belong to any one. Echo prints its parameter to the screen and a long file if the log file is already known. Sample:
echo "Running under %BMP_OS%"
Address directive is used to set your AKAs. The first AKA listed is the main one.
Sample:
Address 2:5030/172.9 Address 2:5030/143.23 Address 135:7000/555.13 Address .50 ; 2:5030/172.50 - relative to main AKA
ArqTemplate ["]file name["]
Directive sets the template filename to generate responses for the messages with Arq flag. Response will not be generated if this keyword is omitted. See also TemplatePath, Templates.
ArqTemplate audit.tpl
BusyFlag directive sets the flag filename pointing that another BMP copy currently loaded. Default is bmp.bsy in the BMP directory. The flag file cannot break the system functionality if bmp suddenly dies -- bmp keeps is open until the end of the process and tries to delete it upon start. If the flag is locked -- another BMP is working.
BusyFlag "\\Server\share\flags\BMP %line%.BSY"
By default a mailslot \\.\mailslot\bmp.bsy is created instead of flag file under Win32 platforms. If the name specified is valid for IPC-mailslot than mailslot will be created. File semaphore is used otherwise. This allows using network semaphore without a file sharing or a privileges.
Valid mailslot name is: (mailslot is a required part of name)
\\.\mailslot\name |
- local host |
\\computername\mailslot\name |
- server |
\\domainname\mailslot\name |
- shared by domain |
\\*\mailslot\name |
- shared by primary domain |
Sample:
BusyFlag \\.\mailslot\bmp%line%.bsy
The queue \QUEUES\bmp.bsy is created under OS/2 instead of flag file by default. If the name specified is valid for IPC-queue the queue will be created. File semaphore will be used otherwise. A queue name must be started with prefix \QUEUES\.
Sample:
BusyFlag \QUEUES\bmp%line%.bsy
Default value undex *nix is /tmp/bmp.bsy.
CarbonGenerated tells to generate a carbon copy of messages created by BMP itself during carbon copy of a main message. Disabled by default.
CarbonGenerated
By default bmp does not handle GPF, relying on OS. If this directive is used access violations will be handled by bmp itself. Upon GPF bmp saves post-mortem dump and exits with with errorlevel 255. Use with care. If the qualifier /pmd is specified post-mortem dump will be generated in any way upon program termination.
CriticalHandler
Set the domain for named binkley outbound directory (see also Outbound parameter). This can be repeated several times for different pair of zones and outbound directories. Sample:
Domain 135 c:\mail\oopsnet Domain 666 c:\mail\devilnet.666
HoldAsUnlisted directive treats Hold and Down system as Unlisted. This option requires V7+ nodelist index.
HoldAsUnlisted
LogFile variable sets the log file name along with a path. There is no log file by default.
LogFile bmp.log
LogLevel variable sets the log level. All messages has prefixes describing the message severity. '!' means errors. You can change the log level by assigning the value to this variable. Final value is the sum of values described below. Only the messages those severity bit is specified in the mask will go to the log file. Default is 63, i.e. all messages.
1 = !Sample:
LogLevel 47 LogLevel 0x2F
The messages with blank and higher will be logged excluding '#' (47=15+32).
Sets the template file name to generate the message about routing loop along with a loop count enough to treat the loop as a routing bug. Zero by default, i.e. loop checking is disabled.
Sample:
LoopCheck 2 loop.tpl
After the second loop (at the third turn) send back the message using the loop.tpl template.
MailerRescan path\file
Sets path and filename of the mailer's semaphore to rescan the queue. N/A by default.
MaxMsgs directive sets the maximum amount of messages allowed to pack at one bmp run. By default all messages are to be packed.
MaxMsgs 40
MsgReadOnly parameter is solely used for debugging purposes. If this parameter is used no messages will be deleted or modified.
MsgReadOnly
NewMsgFlag path\file
Sets the flag to create if new message was generated in the message base.
Outbound variable sets the main binkley style outbound directory without an extension. See also Domain.
Outbound PATH\OUTBOUND
PackIfEmpty parameter has to be set for unconditional packing of the messages even if the message body is empty. By default empty messages are used to create poll if they are without a transit attach or freq and are not processed as described by RobotName.
PackIfEmpty
RobotName directive sets the robot names. Messages addressed to those robots will be packed even with an empty body.
RobotName sqafix RobotName allfix RobotName "Strange Robot"
One should use RouteHold to pack hold messages as hut but using the routing. By default hold messages are not routed.
RouteHold
StorageFile sets the filename where bmp keeps the data between runs. Default is bmp.dat in the bmp main directory. Windows default is the registry path HKLM\Software\BMP\$Version.
StorageFile bmp.dta
TemplatePath ["]directory["]
Sets the directory where BMP will search for generated messages templates. N/A by default. Template names must not include path if this directive was used. Otherwise it is better to use the absolute path. The template name will be concatenated with the path given to get the file name. See also templates description.
TemplatePath "%BMP_DIR%\Template"
The TZ environment variable sets the time zone offset to the west of Greenwich. This value can be set to the OS (in case of DOS that is variable TZ). Configuration file value overrides the OS-specified value. Configuration file value has to be encoded in the same way as in DOS. To override a DOS setting env block should have enough memory to place TZ variable.
Moscow time value:
TZ "MSK-3MSD,M3.5.0/02:00,M10.5.0/02:00"
Newfoundland Standard Time is 3 and 1/2 hours earlier than Coordinated Universal Time (UTC). Standard time and daylight saving time both apply to this locale. Newfoundland Daylight Time is 1 and 1/2 hours earlier than Coordinated Universal Time (UTC):
TZ NST3:30NDT1:30
DOS TZ variable format:
stdoffset[dst[offset][,start[/time],end[/time]]]
The fields has following values:
std, dst
three or more letters that are the designation for the standard (std) or summer (dst) time zone. Only std is required. If dst is omitted, then summer time does not apply in this locale.
Upper- and lowercase letters are allowed. Any characters except for a leading colon (:), digits, comma (,), minus (-), plus (+), and ASCII NUL (\0) are allowed.
offset
indicates the value one must add to the local time to arrive at Coordinated Universal Time (UTC). The offset has the form:
hh[:mm[:ss]]
The minutes (mm) and seconds (ss) are optional. The hour (hh) is required and may be a single digit.
The offset following std is required. If no offset follows dst, summer time is assumed to be one hour ahead of standard time.
One or more digits may be used; the value is always interpreted as a decimal number. The hour may be between 0 and 24, and the minutes (and seconds) - if present - between 0 and 59.
If preceded by a "-", the time zone will be east of the Prime Meridian ; otherwise it will be west (which may be indicated by an optional preceding "+").
Net rule indicates when to change to and back from summer time. The rule has the form:
date/time,date/time
where the first date describes when the change from standard to summer time occurs and the second date describes when the change back happens. Each time field describes when, in current local time, the change to the other time is made.
The format of date may be one of the following:
Jn
The Julian day n (1 <= n <= 365). Leap days are not counted. That is, in all years - including leap years - February 28 is day 59 and March 1 is day 60. It is impossible to explicitly refer to the occasional February 29.
n
The zero-based Julian day (0 <= n <= 365). Leap years are counted, and it is possible to refer to February 29.
Mm.n.d
The d'th day (0 <= d <= 6) of week n of month m of the year (1 <= n <= 5, 1 <= m <= 12, where week 5 means "the last d day in month m" which may occur in the fourth or fifth week). Week 1 is the first week in which the d'th day occurs. Day zero is Sunday.
The time has the same format as offset except that no leading sign ("+" or "-") is allowed. The default, if time is omitted, is 02:00:00.
Sample:
Moscow Time is 3 hours later than Coordinated Universal Time (UTC) in winter and for hours later in summer. Daylight saving time starts last Sunday of March at 2AM. Winter time starts last Sunday of October at 2AM. TZ variable has to be:
SET TZ=MSK-3MSD-4,M3.5.0/02:00:00,M10.5.0/02:00:00
Directs to treat following messages as local:
FLAG | with local attribute only |
AKA | only originating from one of our AKAs |
BOTH | both (by default) |
UseLocal flag
Version7 and Version7+ directives accordingly sets V7 or V7+ nodelist indexes path. By default nodelist is not used. The specified directory must contain files nodex.* of V7 nodelist index.
You can use FastList program by Alberto Pasquale to build the index.
Version7 C:\MAIL\NODELIST Version7+ C:\MAIL\NODELIST
BsyDelayedFlag [["]file name["]]
Directs bmp to create special flag(s) if the mail was not packed because of the bsy-flag for the node.
If the file name were specified the file will contain addresses (one per line) for each such system with a bsy-flag. There will be no duplicate lines in that file. Old addresses already residing in this file will not be deleted.
If the file name were omitted the outbound directory will contain special flags for each node blocked. These files have .pak extensions.
Upon the next full rescan all old flags will be killed (in both cases).
BusyDelayedFlag BusyDelayedFlag .\bsydelay.flg
BusyCheck {All|Bsy|None} directive used to control what is to be treated as a busy flag. All value means to treat as busy flag all files with extension mask ?sy or cs#, where # is the line number from 0 to 9. This is the default. Bsy value will set only the bsy extension to be a busy flag. None disables the busy flags processing completely (busy flags will be neither created nor checked).
Use this parameter on your own risk!
If you are using a file boxes and address is busy mail can be packed to the file box. See the command AllowFileBox for more details.
BusyCheck All
KillInTransitFile {None|KFS|All}
KillInTransitFile instructs to send all files going through our node as KFS (i.e. kill after sent) if set to All. Value None disables KFS for all in-transit attaches so all transit files will persist on your hard drive. KFS value (default) directs to act according to the message flags.
KillInTransitFile All
KillInTransitMail if present instructs BMP to kill all transit messages upon packing in spite of absence of the flag K/S. Disabled by default.
KillInTransitMail
Dedicated to Argus users: use this keyword to have ?lo file content in ANSI codepage. Default is OEM. This parameter is only allowed in Win32 version.
#ifeq %bmp_os% win ANSIflo #endif
AttachShortNames
Instructs bmp to use short file names for attaches. This will work only if attach file was found and only in Win32 version.
#ifeq %bmp_os% win AttachShortNames #endif
CmdGetTemplate ["]filename["]
When you requests files from command line using the Msg modifier the message suitable for transit requests is created. This directive sets the template filename for such a message.
Note! There is an empty file in the template directory for this purpose. Please change it only if you quite sure what are you doing! Not empty request message will be packed by any packer and sent along with the req. I can hardly imagine the big node sysop to be glad to see the netmail saying somebody has requested something... On the other hand transit freq message will be packed by bmp in any case.
See also TemplatePath, Templates, Get Command
CmdGetTemplate freq.tpl
CmdSendTemplate ["]filename["]
When you send the file from command line using the Msg modifier the message is generated to accompany the file. This directive is used to set the template for that message. See also TemplatePath, Templates, Send Command
CmdSendTemplate attach.tpl
FilePath directive sets the path where to look for attached files is the path were not specified implicitly. If the directory on that path is followed by the ellipsis (...) bmp will search this and all underling directories. In any case a file has to be searched in the current directory firstly. This variable is not employed for the transit attach' processing! See also Inbound.
This path is also used to look for the files when doing an update request. The Inbound directive has a priority in this case.
Sample command instructs to search for the files in the current directory, C:\MAIL\INBOUND, C:\MAIL\FILEECHO along with all its underlied directories, C:\ZIP\IMAGE and its subdirectories:
FilePath "C:\MAIL\INBOUND;C:\MAIL\FILEECHO...;C:\ZIP\IMAGE..."
FileWaitDays number
Sets the amount of days BMP has to wait before sending the message if any of the attached files was not found. Waiting days are calculated starting from the message arrival date. During that time such message is skipped by packer and will be sent as is after. If all files will be found earlier the message will be sent without a delay. Default is zero that means not to wait.
If you use lastreads then such message will be checked only with the next full scan (once a day minimum).
For example (wait two days):
FileWaitDays 2
Inbound variable sets the mailer outbound directories. Syntax is the same as in the FilePath. All transit files are searched here whenever full path is specified or not.
This path is also used to scan for the files during update request. Inbound takes the precedence before FilePath.
Inbound "C:\MAIL\INBOUND..."
MisFileTemplate template
Sets the template for the notification message about attach files that were not found. This notification is not sent by default.
MisFileTemplate misatth.tpl
Messages going through the gate will be searched for the inet kludge "To:" if that command were used. If found an empty line will be added after it (if there is no).
That is necessary to satisfy the gate by Safronov but is not known to the GoldEd. Not all gates require that. To-kludges inserted by BMP itself are always followed by the blank line.
Do not use this option if you did not experience any problems without.
FixExistingTo
Gate <address> {["]<Gate name>["]|*} {["]<User name>["]|[*]}
This directive sets the address and name of the internet gate. You can also set the user name (from field). You can use an asterisk * instead of those names if they are not needed. All messages directed to that address will be checked to have the symbol '@' contained in toname. If it is found destination user name will be changed to the gate name (if specified) and inet kludge 'To:' will be inserted to the message body containing the destination user name (inet address). If the user name were specified and the messages checked is the local message the gate user name will placed to the from field. You can specify several gates.
Gate 2:5030/172 UUCP * Gate 2:1/2 * "Email User" Gate 1:1/1 "Some Internet gate"
If ScanForRfc directive was used all messages addressed to the node running gate software requiring the special name in the to: field but having no such name will be scanned for rfc to: field. If that would be found the FIDO to: will be filled in and the message will be considered to be addressed to the internet.
That is needed to fix the GoldEd bugs, not always using correct to: field in the case it knows the real addressee name (not the email-address).
Do not use if you have no such problem.
ScanForRfc
MaxOutSize xxx
MaxOutSize directive sets the maximum allowed size of ?ut-files. If that size is exceeded the packet will be renamed to ????????.pkt and attached as a file attach. New message will be packed to the new ?ut. Not defined by default. See also MsgExtent.
This setting can be changed individually for each node in the Links section.
MaxOutSize 0x10000
MsgExtent xxx
xxx is the biggest message size (bytes) for which packing to ?ut is allowed. All messages exceeding this size will be packed (one message per packet) and sent as a file attach (they will not be archived however so the remote system will treat that as a mail). See also MaxOutSize
This setting can be changed individually for each node in the Links section.
PacketNames {Radix16|Sequential}
This sets the packet names creation strategy. Default is Radix16 that means to cerate names in hex radix (for example ee8a2ce8.pkt) depending on the system time. The value Sequential means to create the names in increasing order. For example: 00000001.pkt, 00000002.pkt. That is strongly not recommended since it increases the packed name' dupe possibility.
PacketNames Radix16
This sets the directory to create pkt-files in. By default packets are stored in same directory as corresponding ?uts.
Packets can be stored into the special directory for the given system.
PacketPath c:\mail\pkts
This option sets the type of the generated packets. Possible values are 2+ (default) or FSC-0048. If the packet is originated from the point system the sender net will be set to -1. Sadly not all programs handle that situation correctly. The value FSC-0039 sets 2+ packet type with a real OrigNet. This can mess the StoneAge systems so that they will think the packet is from boss node, but not from a point. The value 2.0 or FTS-0001 instructs to generate 2.0 type packets.
This setting can be changed individually for each node in the Links section.
PacketType FSC-0039
AllowFileBox <type> [, <type> ...]
<type> ::== mail, files, none
This option enables or disables global file boxes usage for some kind of messages if the system is busy (there is a flag bsy during pack). Disabled (none) by default. One can enable file box packing for netmail only (mail), file attaches only (file) or both.
If the busy flag for the routing system found and fileboxes were defined in the configuration either globally or using named filebox for the given node in the links section then the mail would be packed into the corresponding box. There is a chance to send the mail during the same session.
If the file attach is packed the attach message will be also packed into the pkt and put to same filebox. There is no warranty it will be sent after the file itself since filebox can not be sorted. The mail flavor will be effectively lost also.
You should remember that filebox content will be sent by the mailer in the files batch of the protocol used (if that is appropriate for the protocol) so remote mailer will receive those in the files batch also. The remote mailer could be so cruel to accept netmail only within the netmail batch at treat the packet sent in this way as a regular attached file. If such a disaster will occur the mail will be held in the remote inbound waiting for a tossing for a long time or even forever. That can hardly happen but check the remote before doing so. That is potentially dangerous setting.
File requests can not be packed to the file box since they will be sent at the last protocol batch and there will be nobody to answer it.
Please note this setting is not taken into account during the forced filebox attach from the command line (using Send command along with Box modifier).
This setting might be overridden fo the given address in the links section.
Sample:
AllowFileBox mail, files
FileBoxes T-MAIL [/long] ["]path["]
This sets the path to the t-mail style fileboxes. With t-mail style every node address uniquely defines the personal subdirectory in the given directory. This name is generated automatically.
The modifier /long instructs to use the long filenames for the fileboxes. Long file name can not be created under DOS so this modifier is disabled in the DOS-version. Use macros if necessary.
Beyond that each node can have the named filebox defined in the links section. The named filebox takes precedence.
See also AllowFileBox.
Sample:
#ifeq %bmp_os% DOS FileBoxes t-mail .\FileBox #else FileBoxes t-mail /long .\FileBox #endif
KillEmptyFileBoxes { all | none | t-mail | named }
This option allows BMP to delete empty fileboxes during scan. Possible values:
KillEmptyFileBoxes all
FullScanAt cron
If bmp were started at the time matching cron condition it would do a full netmail scan ignoring lastreads as if /a qualifier were used. This directive may be repeated several times with different time intervals.
Sample:
FullScanAt * 10 FullScanAt 0-5 20 * * * 4 utc
FullScanEvery hh[:mm]
The directive would instruct to perform a full netmail scan ignoring lastreads (as if /a qualifier were passed) if the last full scan took place more time ago then specified. Time format is hh:mm, i.e. hours and minutes. Minutes can be omitted along with a colon. 00:00 will disable the feature (default).
As the new day starts full scan will be performed unconditionally.
FullScanEvery 01
FullScanOnChange ["]file name["]
The directive sets the file name to check the modification time. If the modification time is changed the full scan will be performed (ignoring lastreads) as if /a qualifier were passed. The directive may be used several times.
FullScanOnChange bmp.cfg
FullScanOnFlag ["]file name["]
The directive sets the flag filename to perform a full scan if the flags file is detected (ignoring lastreads) as if /a qualifier were passed. The flag file will be removed with the next full scan.
FullScanOnFlag fullscan.now
lastread offset
The directive sets the offset inside the lastread file (so called the user number). If this is used the next scan will be started from the last scanned message. Forced full scan is performed once a day.
There will be also a full scan if the /a qualifier is passed from the command line.
lastread 5
If all packets listed in lo-file are deleted during repack that (and only that) poll will be deleted. Use this option to change this behavior.
KeepPollOnRepack
RepackAt cron
If bmp is started at the time specified by the cron expression then repack will take place. You need to specify the /r qualifier additionally to enable the feature. The directive can be repeated several times with different crons.
Sample:
RepackAt * 10 RepackAt 0-5 20 * * * 4 utc
RepackEvery hh[:mm]
If the /r qualifier is specified this directive instructs to perform a repack if the last one has occurred more time ago than specified. Time format is hh:mm, that is hours and minutes. Minutes can be omitted along with a colon. Default setting is 00:00 (disable).
RepackEvery 01:00
RepackOnChange ["]file name["]
Directive sets the flag file name. If the flag file modification time has been changed a repack will occur during pack. That is so the /r qualifier is specified. The directive can be repeated. You can set it to the routing configuration file and (or) nodelist index.
RepackOnChange route.cfg RepackOnChange "C:\MAIL\NODELIST\nodex.dat"
RepackOnFlag ["]file name["]
Directive sets the flag file name to do a repack during pack if /r modifier is specified. This file will be deleted upon next full repack.
RepackOnFlag repack.now
This section is used to set the netmail bases and a scan options.
AreaDef ["]tag["] {FIDO|SQUISH|JAM} ["]path["] [-pAddress]
AreaDef describes a netmail area so that bmp knows it.
Tag -- an unique area name used to identify it.
The second parameter sets the message base type -- FIDO, SQUISH or JAM.
Path sets either a path to FIDO-style base or a full filename of a squish/jam base (with the path but without an extension.
-p qualifier is used to set the main AKA for that base. The first of our AKAs is used by default. This address would have been selected during aka-matching with other equal conditions as if it would had been our main AKA. Please note if a message is from one of our addresses the aka-match does not take place! The exception is explicitly specified or forced link AKA if defined in the links section.
Another usage of the aka from AreaDef definition is to set the default zone for that area. If zone information is omitted in a message the default zone is used. Default is specified by the main aka or by this qualifier.
Sample:
areadef netmail fido %net% areadef Base.Netmail squish %net%\base areadef "Crazy.Netmail" squish "%net%\crazy" -p2:5030/143.23 areadef JBase jam %net%\jbase areadef .Unpack fido unpack areadef .Carbon fido carbon
ScanArea ["]tag["]
ScanArea commands sets an area tags to scan during pack. All tags must be used only after they have been declared by the AreaDef. Several ScanArea commands can follow one after the other. These and only these areas are scanned during pack. After the ScanArea definition can be placed other directives used for this and only for this area.
Sample:
ScanArea netmail ScanArea "Base.Netmail" ScanArea Crazy.Netmail ScanArea JBase
CarbonArea ["]tag["]
CarbonArea command can follow ScanArea and used only for that area. Parameter is the area tag to place the carbon copied from scanned area messages into. A message will be copied not in the condition it was in the source area but as it has been sent. "AREA:" kludge will be added with an area tag of the source area to the message. Empty messages are not carboned.
See also CarbonGenerated.
Sample:
ScanArea netmail ScanArea Base.Netmail CarbonArea .Carbon ScanArea Crazy.Netmail CarbonArea .Carbon ScanArea JBase
(Copy sent messages to the area .Carbon from the areas Base.Netmail and Crazy.Netmail).
UnpackArea ["]tag["]
UnpackArea set the tag of the netmail area to unpack the messages to during unpack. It is better to create a special area for this purpose (not the same from which the messages were packed). Otherwise the messages which were not killed when sent but having Sent flag instead would be duped at unpack time. This also guaranties that bmp started by scheduler will not pack everything back ;)
UnpackArea .Unpack
This section is used to set the routing rules. The rules a screen from top to bottom of the configuration file until the first rule suitable for the message. There are three different kind of command: for mail, file attaches and file request routing. Netmail routing rules a ended with the word "Mail", file commands with "Files", request with "Freqs". There are no default routing rules.
Mail (files, requests) for that addresses will be packed directly.
This rule sends the mail satisfied to the 'compound mask' via 'address', via (Host), via (Hub) node's hub (or a point's node hub), via boss node (Boss) of the point (or directly if that is a node, not a point). Nodelist must be defined to use hub-routing.
Hub keyword means also a net/region/zone host of the independent system residing not under a hub but under a host/region/zone.
Mail satisfied this rule will be sent to /dev/nul except for the local mail having Dir or Hold attribute (it's difficult to imagine someone needs it). Via (^) address has no sense in this case and assumed to be the same as destination (to) of the message. Attached files will be processed as if the message was really sent except that the TFS flag assumed to be KFS and the file search will only be done using the Inbound path (FilePath will not be searched). Files attached to the local mail will not be killed in any way.
The same as kill except that bounce message will be generated using the template supplied. Bounce message will be either sent to the message originator or safe to the message base if the source message was local. See also TemplatePath.
This directive is just like the bounce but the complain message will be sent to the address specified by the second parameter. If Host/Hub/Boss keyword was used corresponding node counted not from the destination address but from the originating address since that is implied the message is going back. Sample:
Complain-Files pntfiles.tpl Boss -2:5020/#.#
will send complain to the boss of the point who has sent files for us.
Via (^) address here is the complain destination.
This option rules the poll creation when doing a file request. Whenever a file request satisfied the 'compound mask' is generated only the polls with listed in the command flavors will be generated. If no satisfying rule found then all polls will be generated. To disable any polls set the first parameter to "-". This rule is only applied for non-transit freqs.
Sample:
Freq-Flavour CI ^*
will allow to create only Imm and Crash polls.
Freq-Flavour - *
will disable all polls for all file requests.
This will disable mail and attach generation with specified by the first parameter flavors. If the first parameter is '*' all flavors will be disabled. Whenever that is needed to create ?ut or ?lo with the attribute specified for the message satisfying the 'compound mask' the flavor from this command will be used instead. You can for example hold all the mail to the foreign net:
Flavour-kludge * H !^2:5030/*
If the routine rule found all specified CanRouteIf will be testes. Routing is enabled if and only if all conditions are met. If some conditions are failed routing will be disabled. If the command disabled the routing was used with an exclamation point (!) there will be no additional tries to find suitable routing rule and a message will be generated saying that is impossible to send the message ("constraint prevents msg from beeing routed...").
One can disable to send the mail through a Hold or Unlisted node:
CanRouteIf !^Raw:Hold & ^Listed
or disable to route a mail origination from zone 999:
CanRouteIf! !-999:*
If the suitable routing rule was found message is tested against this condition. If ignore condition meets the message will be silently ignored.
The example shows how to disable pack the mail to the /2:
Ignore /2
This allows to send files attached by encoding into UUE/XX/Base64, packing and sending as a regular mail. Message split size can be specified optionally. By default messages are splitted using MsgExtent. The address mask is used as usual. File routing for these nodes must be enabled. Generated messages are not attaches speaking technically but will be sent using a file routing.
Files attached to the messages with KFS/TFS attributes are killed immediately after encoding!
This sample is only intended to show how to use the routing commands. This can be hardly used a real routing.
Send the mail directly to:
Direct-Mail /143, /172 Direct-Mail .2#
Direct mail to the nodes (but not a points) CM of the net 2:5030, any nodes with password protected session and known working time if phone numbers are knows and they are not in hold:
Direct-Mail (5030/* & !Raw:Point & CM, Protected & KnownTime) & !Raw:Hold & Published
Following three commands describe the routing where the mail for a 2:5030 nodes is packed to their hubs, point' mail for their bosses if the boss is not in hold. All the rest mail is going to the network host.
; Route-Mail Hub /# ; Route-Mail Boss /#.* & !^Raw:Hold ; Route-Mail /0 *
Below is the address list for which a mail will be routed to /143:
Route-Mail /143 /172.50, 135:*, 2:5030/143.*, 2:5030/142.*
Below is the address list for which a mail will be routed to /172:
Route-Mail 2:5030/172 .*
All node' mail below the hub /6 is routed to its hub:
Route-Mail Hub [Hub]/6
Our AKAs list and the downlink list mail from which will be routed to corresponding uplinks:
Route-Mail 2:5030/143 -2:5030/143.23,-135:7000/555.* Route-Mail 2:5030/172 -2:5030/172.9
Bounce all the mail to the 666 zone:
Bounce-Mail bounce.tpl 666:*
All the rest mail is going to /172
Route-Mail 2:5030/172 *
All files for /172.* are going through /172:
Route-Files 2:5030/172 2:5030/172.*
Files that going through /143:
Route-Files 2:5030/143 2:5030/143.*,135:7000/555.*
Send files directly to zones 2 and 3 if destination addresses are listed:
Direct-Files (2:*, 3:*) & Listed
For the mail that has not been sent at the previous step (just in case that is a point) route their files through their bosses, if bosses are listed:
Route-Files Boss (2:*, 3:*) & [Boss]Listed
Do not send files to other zones.
Attaches that going to the zone 667 has to be killed:
Kill-Files 667:*
Convert attaches to foreign networks, for the systems with unknown phone numbers or working times into XXE-encoded messages and split that message by 30000 bytes in average:
Encode-Files XX /Split=30000 (!5030/* & !135:7000/*) | !Published | !KnownTime
Attaches addressed for a gate has to be encoded into Base64 and splitted by 256000 bytes.
Encode-Files B64 /Split:256000 gate
Attaches going to the /143 has to be UUE-encoded and splitted using <msgextent> value.
Encode-Files UU /143
Direct freqs inside a network:
Direct-Freqs 2:5030/*
All the rest file requests will go to /200:
Route-Freqs 2:5030/200 *
For the freqs originated from /172.1 and /143.20 enable the poll generation with any flavors:
Freq-Flavour ICDF -2:5030/172.1, -2:5030/143.20
Only Imm and Crash polls are allowed for requests to the zone 2:
Freq-Flavour IC ^2:*
Do not create any other polls:
Freq-Flavour - *
Use direct instead of any other attributes for /172:
Flavour-kludge * D ^2:5030/172
Imm, Crsh and Dir flavors are disabled and changed to Normal for the net 2:5030/* and zone 135:
Flavour-kludge IDC N ^2:5030/*, ^135:*
For all systems the mail is packed to except zone 135 and net 2:5030 , change all attributes to Hold:
Flavour-kludge * H !^135:* & !^2:5030/*
Disable routing via hold nodes:
CanRouteIf !^Raw:Hold
Optional section is describing a links and their parameters. Link addresses goes first followed by the commands applied to that link. The next link can de described after.
Address address1 [,address2 ...]
This sets the list of addresses for which following commands are applied.
Address /142, /143
Aka address
Sets one of our AKAs to be selected during aka-matching when packing a mail to that system. See also ForceAka and AreaDef.
Aka 135:7000/555.13
ForceAka address
The same as previous command Aka, except for more strict condition: address configured will be chosen even if the standard aka-matching procedure is not used (that is if the message originating address is one of our AKAs). See also AreaDef.
ForceAka 135:7000/555.13
Overrides the global setting AllowFileBox for the address. You can also disable filebox usage for the node specifying
AllowFileBox none
FileBox ["]directory["]
This option sets the named file box for the system. It will be used instead of t-mail style globally defined directory for the file boxes.
FileBox .\filebox\Alex
MsgExtent xxx
Overrides the global setting MsgExtent for the packets created for this node.
MaxOutSize xxx
Overrides the global setting MaxOutSize for the packets created for this node.
PacketPath ["]directory["]
Overrides the global setting PacketPath for the packets created for this node.
PacketPath ["]directory["]
Overrides the global setting PacketType for the packets created for this node.
PktPassword ["]password["]
Sets the password BMP will embed into the packets packed for this node. Maximum password length is 8 characters. Sample:
PktPassword cumran
Address /172 PktPassword cumran PacketPath .\Pkt\Alex MaxOutSize 300 MsgExtent 140 Address /142, /143 PktPassword sophia PacketType 2.0 forceaka 135:7000/555.13 PacketPath .\Pkt\Crazy Address 2:5030/200
BMP uses template file when generating the messages. Template files are searched in the directory set by the TemplatePath variable. Messages created by BMP are usually some kind of replies to some source message.
Special variables can be used inside the template body. This variables will be substituted at the message generation time. That is variable list:
%PID | - | BMP short identifier |
%LONGPID | - | BMP long identifier |
%ATTR | - | original message attributes |
%BODY | - | original message body quoted along with kludges |
%DATE | - | original message date |
%SIZE | - | original message byte size |
%SUBJ | - | original message subject |
%ODEST | - | original message destination address (orig destination) |
%OFFROM | - | original message sender first name (orig first from) |
%OFROM | - | original message sender full name (orig from) |
%OFTO | - | original message recipient first name (orig first to) |
%OLFROM | - | original message sender last lame (orig last from) |
%OLTO | - | original message recipient last name (orig last to) |
%OORIG | - | original message originating address (orig origin) |
%OTO | - | original message recipient full name (orig to) |
%TDEST | - | generated message destination address (this destination) |
%TFFROM | - | generated message sender first name (this first from) |
%TFROM | - | generated message sender full name (this from) |
%TFTO | - | generated message recipient first name (this first to) |
%TLFROM | - | generated message sender last name (this last from) |
%TLTO | - | generated message recipient last name (this last to) |
%TORIG | - | generated message sender address (this origin) |
%TTO | - | generated message recipient full name (this to) |
%VIA | - | original message route address it was packed via (if applied) |
%MISATTH | - | list of missing attached to the message files when doing missing attached files notification message (MisFileTemplate) or when doing an attach message from the command line (CmdSendTemplate) |
%_??? | - | ??? is one of the variables listed above describing a name or an address. Underscore prefix sets the fixed field width. That is 36 characters for a names and 23 characters for an addresses. |
Sample of the ARQ template:
Dear %tfto! Your message was packed via %via Original message: * from : %ofrom (%oorig) * to : %oto (%odest) * subj : %subj * date : %date * attr : %attr %body Forever with You, /%longpid at %torig