Add magimail (crashmail2 fork) to repo

This commit is contained in:
Andrew Pamment
2017-03-18 23:04:38 +10:00
parent 8fad85affc
commit 807574ccf4
98 changed files with 23583 additions and 7 deletions

View File

@@ -0,0 +1,114 @@
Description of CrashMail's built-in AreaFix
===========================================
What is AreaFix?
----------------
AreaFix is a feature present at most FidoNet nodes, either built-in in
the tosser or as a stand-alone program. AreaFix allows you to connect
and disconnect to echomail areas, change your password and change some
other things in your configuration without asking your feed/boss to do
it for you.
How do I talk to AreaFix?
-------------------------
You communicate with AreaFix using netmail messages. The message header
of a message to AreaFix should look like this:
From: Johan Billing
To: AreaFix
Subj: <password> [<switches>]
<AreaFix commands>
...
---
<Password> is your private AreaFix password that you need to make sure
that nobody else alters your configuration. Your AreaFix password is
assigned to you by your boss/feed, so you may have to ask him about a
password.
[<switches>] are extra commands that you can send to AreaFix. Currently
there is only one switch:
-l or -q Send list of all areas
This switch is only here to be compatible with other AreaFix programs.
It is recommended that you use the %-commands described later instead.
"---" marks the end of an AreaFix message.
NOTE: The name doesn't necessarily have to be AreaFix, your boss may have
configured CrashMail to use other names instead.
What commands can I put in the text?
------------------------------------
Change connected areas:
[+]areaname[,R=<max>] Connect to an area. The '+' is optional. If
the R option is specified after the area,
the specified number of old messages in the area
will be rescanned and sent to you.
-areaname Disconnect from an area
=areaname[,R=<max>] Update. You can use this to rescan an area which you
already are connected to.
Special commands
%HELP Send this text
%LIST Send list of all areas
%QUERY Send list of all linked areas
%UNLINKED Send list of all unlinked areas
%PAUSE Do not send any echomail until a %RESUME is sent
%RESUME Send echomail again. These commands can be useful
if you are away for a few weeks and don't want to
get any echomail.
%PWD <pw> Changes your AreaFix password to the new password
specified after the command.
%COMPRESS <name> Changes the packer used to compress your mail to
the packer specified after the command. Send
"%COMPRESS ?" to get a list of packers.
%RESCAN All areas that are added or updated after this
line will be rescanned, that is all old messages
in those areas will be sent to you. This can be
very dangerous since you don't know how many
messages you will get so in most cases, it is
better to use the R option when adding/updating
areas instead.
Examples:
=========
R20_TRASHCAN Connect to R20_TRASHCAN
%LIST Send list of areas
R20_AMIGA,R=50 Connect to R20_AMIGA and get the last 50 messages
in the area.
%PWD xyzzy Change your AreaFix password to "xyzzy".
%COMPRESS ZIP Change your compression method to ZIP.
%PAUSE Turn off echomail for a while
%RESUME Turn on echomail again
=R20_AMIGA,R=100 Get the last 100 messages in R20_AMIGA (if you are
already connected to the area)
A few words on rescan
=====================
Messages that are rescanned might not look exactly like they originally did
because of the way they are stored locally. When messages are rescanned from
a JAM messagebase, all control lines ("kludges") will be at the beginning of
the message regardless of where they originally were. You can easily tell if
a message has been rescanned, just look for the RESCANNED control line.

View File

@@ -0,0 +1,505 @@
CrashMail II
The Next Generation!
...a stranger in a strange land...
============
Introduction
============
Welcome to CrashMail II! CrashMail II is basically a more portable version
of CrashMail, my tosser for Amiga computers. Users of the old Amiga
version will probably find some things familiar while some features are
gone such as the ARexx port (for obvious reasons!) and the GUI
configuration editor. The only feature that CrashMail II has and the old
CrashMail hasn't is support for JAM messagebases. (By the way, I have also
written a tick file processor called CrashTick for the Amiga. If someone
wants to port it, contect me and I'll give you the source.)
For suggestions, bug reports and questions, don't hesitate to contact me at:
billing@df.lth.se
=========
Copyright
=========
Copyright (C) 1998-2004, Johan Billing <billing@df.lth.se>
Copyright (C) 1999-2010, Peter Krefting <peter@softwolves.pp.se>
Copyright (C) 2009-2013, Robert James Clay <jame@rocasa.us>
Copyright (C) 2013, Lars Kellogg-Stedman <lars@oddbit.com>
JAMLIB is copyright (c) 1999 Björn Stenberg. JAMLIB is released under the
GNU Lesser General Public License, See src/jamlib/jamlib.doc for more
information.
Except where explicitly stated otherwise, all other parts of CrashMail are
copyright 1998-2004 Johan Billing. Permission to use, copy and distribute
CrashMail is granted provided that this copyright notice is included. Permission
to modify CrashMail is granted. Distributing modified versions of CrashMail is
allowed provided that the documentation clearly states that it is a modified
version. Parts of CrashMail may be freely used in other projects as long as
the documentation mentions the original copyright holder.
================
Acknowledgements
================
Many thanks to Björn Stenberg for creating the excellent subroutine library
JAMLIB which CrashMail uses for handling JAM messagebases.
Thanks for Peter Karlsson for porting CrashMail II to OS/2 and the man pages.
=============
Documentation
=============
The documentation is very brief and CrashMail probably isn't the ideal
choice for Fidonet beginners. All documentation of the available keywords
in the configuration file can be found in the example crashmail.prefs file.
Some other items about CrashMail that are worth mentioning can be found in
the section below.
Items that need to be discussed
===============================
Platforms
---------
This version of CrashMail can be compiled for Win32, Linux and OS/2. If you
are interested in running CrashMail on another platform, please contact me if
you are willing to do the work necessary to adapt CrashMail to your platform.
The amount of work required mostly depends on whether your C-compiler supports
some common POSIX-functions which CrashMail uses.
Some notes on different platforms:
Win32 & OS/2
If you want to use an old reader that only can handle 8+3 filenames,
you have to use %8 in the path of your DEFAULT area if you are using
the auto-add feature. This creates an 8 digit serial number to use as
the path for the area. Note that if CrashMail is run twice in a short
period of time (a few seconds), it might create duplicate paths. Avoid
%8 if it is at all possible.
Linux
Don't use the ~ character in paths. Such paths are expanded to point
to your home directory by the shell and not by the i/o functions in
the system. They will not work in CrashMail.
In *.msg areas, make sure that all files are named *.msg and not *.MSG!
If they are not named in lowercase, CrashMail will not export them.
As an extra bonus, the Linux version of CrashMail can use the syslog instead
of using its own log file. Just use "syslog" as the name of your log file.
If the precompiled binaries in the CrashMail archive don't work on your
system, you will have to compile your own. See INSTALL for more
information about this.
Arguments
---------
Available arguments for CrashMail:
SCAN
Scan all areas for messages to export.
TOSS
Toss all .pkt files and bundles in inbound directory.
TOSSFILE <string>
Toss the specified file.
TOSSDIR <string>
Toss all files in the specified directory.
SCANAREA <string>
Scan the specified area.
SCANLIST <string>
Scan all areas listed in the specified file.
SCANDOTJAM <string>
Scan all areas listed in an echomail.jam/netmail.jam file. The main difference
between SCANDOTJAM and SCANLIST is that a *.jam file contains the paths to the
messagebases instead of tagnames. Areas are only scanned once even if listed
multiple times.
RESCAN <string>
RESCANNODE <string>
RESCANMAX <string>
Rescans the specied area for the specied node. If RESCANMAX is specified,
it sets the maximum number of messages to rescan.
SETTINGS <string>
Use this configuration file instead of the default. You can use the
environment variable CMCONFIGFILE to set the default configuration file.
VERSION
Show version information about CrashMail.
LOCK
Locks CrashMail's configuration file and then exits. CrashMail has a simple
locking mechanism to ensure that two instances of CrashMail never use the
same configuration file at the same time. You can use this if you want to
temporarily want to stop CrashMail from running, e.g. when updating the
nodelist.
UNLOCK
Removes the lock on CrashMail's configuration file. Only use this when the
configuration file previously has been locked with LOCK, otherwise terrible
things might happen.
NOSECURITY
Process all packets without security checks. This is intended to be used
mainly with TOSSDIR/TOSSFILE and with packets created by CrashWrite.
Support programs
----------------
crashexport <crashmail.prefs> <output file> <format> [GROUP <groups>]
This command reads a CrashMail configuration file and creates an arealist.
If the GROUP keyword is used, only areas in the specified groups are
included. CrashExport can create lists in these formats:
AREASBBS
A standard areas.bbs file that can be read by many programs
FORWARD
A list of areas that can be used for forward-requests on other nodes.
The file is a pure ASCII file where each line contains the name of the
area and its description.
FORWARDNODESC
Same as FORWARD but without area descriptions.
GOLDED
Creates an area configuration file in GoldED format.
TIMED
Creates an area configuration file in timEd format.
crashstats <statsfile> [SORT <mode>] [LAST7] [NONODES] [NOAREAS]
This command displays the statistics file created by CrashMail. With the
SORT keyword you can specify these sort modes:
a Sort alphabetically
t Sort by total number of messages
m Sort by msgs/day
d Sort by first time messages were imported
l Sort by last time messages were importd
u Sort by number of dupes
With LAST7, you can see detailed information about the flow of messages in
area areas for the last seven days. With NONODES and NOAREAS you can decide
to hide node or area statistics.
crashlist [<dir>]
Builds an index for the nodelists in the specified directory (or in the
current directory if no directory is specified). To find out what
nodelists to read, CrashList uses a file called cmnodelist.prefs in the
nodelist directory. The format of this file is as follows:
<nodelist name> [<default zone>]
As the name of the nodelist, you can either specify the full name of the
nodelist or just the base name of the nodelist (without .xxx at the end).
If you just specify the base name, CrashList will use the latest nodelist
with that name (selected by date, not the extension). A default zone can
be used for regional nodelists without a Zone line. All lines beginning
with a semicolon are treated as comments. Pointlists should be in
BinkleyTerm format and should be specified after the real nodelists.
Example cmnodelist.prefs:
; Configuration for CrashList
;
; Format: <nodelist> [<default zone>]
NODELIST
BTPOINT
crashgetnode <node> [<nodelist dir>]
Looks up the specified node in the nodelist and prints the information
that was found. If no nodelist directory is specified, CrashGetNode uses
the path specified in the environment variable CMNODELISTDIR.
crashmaint [MAINT] [PACK] [VERBOSE] [SETTINGS <filename>] [PATTERN <pattern>]
Deletes old messages according to KEEPNUM and KEEPDAYS in crashmail.prefs. The
program can do two different operations on a messagebase, MAINT and PACK. The
meaning of these two modes are different for different messagebase formats.
*.msg
MAINT deletes messages and PACK renumbers the area.
JAM
MAINT sets the Deleted flag for the messages. PACK removes all messages with
the Deleted flag from the messagebase.
Both MAINT and PACK can be specified at the same time. You can specify a
config file other than the default with the SETTINGS keyword (use the
environment variable CMCONFIGFILE to set the default configuration file).
Using the PATTERN keyword, you can perform the operations on only some of your
areas. VERBOSE gives you a lot of information which you don't really need.
Example: crashmaint MAINT PACK PATTERN R20_AMIGA*
crashwrite DIR <directory> ...
CrashWrite reads a text file and creates a .pkt file that can be processed
by CrashMail. This can be used to post announcements and other messages in
areas. The best way to use CrashWrite is to let it generate packets in a
separate directory and then toss them with TOSSDIR NOSECURITY.
There are many keywords for CrashWrite. All keywords are optional except for
DIRECTORY. If you do not enter a keyword, a default value will be used.
FROMNAME <string>
FROMADDR <node>
TONAME <string>
TOADDR <node>
SUBJECT <string>
Use these keywords to set the header of the message. You only need to enter
TONAME and TOADDR for netmails.
PKTFROMADDR <string>
PKTTOADDR <string>
Use these if you want to set the origin and destination address of the packet
to something other than the origin and destination address of the message
inside the packet. If you do not specify these keywords, FROMADDR and
TOADDR will be used for the packet as well.
PASSWORD <string>
You can use this keyword to set a password for the packet. The maximum
length of the password is eight characters.
AREA <area>
The area the message should be posted in. If you do not enter an area, the
message will be sent as a netmail.
ORIGIN <origin>
The origin line for the message. This keyword has no effect for netmail
messages.
DIR <dir>
The directory where the packet should be placed.
TEXT <filename>
The name of a text file that should be included as the message text.
NOMSGID
Prevents CrashWrite from adding a MSGID line.
FILEATTACH
Sets the file-attach flag for netmails. The filename should be put in the
subject line.
crashlistout <directory> [<zone>] [<pattern>] VERBOSE
This command lists the contents of a outbound directory. Use zone to specify
which zone the directory is for (the default is 2). It is possible to only
list files for nodes that match a specified pattern. If you use the VERBOSE
switch, crashlistout will also list the contents of any *.req and flow files.
Paths
-----
You should always use absolute paths in crashmail.prefs, otherwise CrashMail
will fail to unpack incoming bundles. If you use relative paths, CrashMail
will also use relative paths in flow files which might confuse your mailer.
Outbound
--------
CrashMail uses a 5D BinkleyTerm outbound. If there is a demand for FrontDoor
style outbounds (*.msg based), it might be implemented in a future version.
Messagebase formats
-------------------
CrashMail currently can use *.msg messagebase and JAM messagebases.
Some notes on the different messagebase formats:
*.msg
*.msg is the most basic format for Fidonet messages. It is specified in
FTS-0001 and most Fidonet programs can handle this. There are however some
variations. There are Zone and Point fields in the message header, but
since some programs use them for other purposes, CrashMail doesn't read
them. This means that CrashMail won't work if your reader doesn't create
INTL, TOPT and FMPT kludge lines. Most readers do so this probably won't
be a problem.
JAM
JAM is a newer messageformat which while not perfect at least is much
better than *.msg. It provides reply-linking, but unfortunately not
between areas. JAM has a few odd features which CrashMail does not
support. CrashMail will not create TRACE fields from Via kludges, it
does not support messages with multiple recipients (carbon copies) and
it does not support file-attaches with wildcards, indirect file-attaches
or file-attaches with aliases. CrashMail also handles only one attached
file/file request per message.
Highwater marks
---------------
CrashMail can use highwater marks to speed up the exporting of messages. The
highwater mark is only the number of the highest exported message in an area.
If you decide to use highwater marks, CrashMail will only export messages
with a message number that is higher that the old highwater mark. If you want
to export messages with a lower number than the highwater mark, you have to
force CrashMail to scan the whole area by deleting the file where the
highwater mark is stored. In *.msg areas the highwater mark is stored in the
first message of the area (1.msg) and in JAM areas it is stored in the
<basename>.cmhw file. (Also note that this is why the first message in a
*.msg area never is exported.)
Nodelists
---------
CrashMail can use two nodelist formats:
1) Its own nodelist format ("CMNL"). The format consists of a rather simple
index which is created by the program CrashList. See the descriptions of
CrashList and CrashGetNode for more information.
2) A nodelist in the Version7+ format ("V7+") used by BinkleyTerm and other
programs.
Patterns
--------
String patterns
String patterns are rather primitive in CrashMail. There are two available
wildcards, ? and *. ? matches any character and * matches the rest of the
string. ab*, ab*de and ab*de* are therefore equivalent and all match all
strings beginning with ab. String patterns are used for robot names, remap
names etc.
Node patterns
CrashMail has very powerful pattern matching for nodes. "*" and "?" can
be used as wildcards and there a special keywords that matches all nodes
that belongs to a zone, region, net, hub or a node.
2:200/207.*
This would match 2:200/207.1, 2:200/207.2, 2:200/207.42 etc
2:200/2*.*
This would match 2:200/213.99, 2:200/224.48, 2:200/207.0 etc.
This would NOT match 2:200/103.42.
2:200/2?.*
This would match 2:200/24.42, 2:200/25.52 but not 2:200/200.0.
2:*/100.0
This would match 2:200/100.0, 2:200/100.0, 2:300/100.0 etc.
ZONE 2
This matches everything in zone 2. This has the same effect as 2:*/*.*.
REGION 2:20
This matches everything in region 2:20. You can only use the REGION
keyword if you use a nodelist.
NET 2:200
Matches everything in net 2:200. This is the same as 2:200/*.*.
HUB 2:205/300
Matches all node that belongs to the hub 2:205/300. You can only use
the HUB keyword if you use a nodelist.
NODE 2:200/108
Matches the node 2:200/108 and all its points. This does exactly the
same as 2:200/108.*.
*:*/*.*
This would match everything.
Destination node patterns
These are a bit more complicated since the destination node of the
operation is also involved. This is best explained with netmail routing
as an example. In CrashMail, destination node patterns are also used
in the remap function, but it works very similarly there.
*:*/*.0, netmail for 2:200/108.7
This netmail would be routed to 2:200/108.0
*:*/0.0, netmail for 2:200/108.7
This netmail would be routed to 2:200/0.0
ZONE, netmail for 2:201/274
This netmail is routed to the Zone Coordinator, in this case 2:2/0.
REGION, netmail for 2:200/207.5
This netmail is routed to the Region Coordinator, in this case 2:20/0.
You can only use this keyword if you use a nodelist.
NET, netmail for 2:200/108.7
This netmail is routed to the host of the net, in this case 2:200/0.
This is the same as *:*/0.0
HUB, netmail for 2:200/108.7
This netmail is routed to the hub of the node, in this case 2:200/100.
You can only use this keyword if you use a nodelist.
NODE, netmail for 2:200/108.7
This netmail is routed to the boss of the point, in this case 2:200/108.0.
This is equivalent to *:*/*.0.
*:*/*.*, mail for 2:203/699.0
This would be routed to 2:203/699.0

View File

@@ -0,0 +1,714 @@
; Example configuration file for CrashMail II
;
; This file demonstrates all keywords you can use in the configuration file.
;
; General configuration
; =====================
;
; SYSOP <name>
;
; This keyword lets you configure the name of the system operator. It is used
; as the sender name of all messages that CrashMail generates. (Bounce
; messages, receipts, AreaFix responses.) Max 36 characters.
SYSOP "Johan Billing"
; LOGFILE <filename>
; LOGLEVEL <level>
;
; Here you can configure the logging in CrashMail. CrashMail will write all
; log messages with a level lower than the level configured here both to the
; console and to the specified file.
;
; The following loglevels exist:
;
; 1 Minimum
; 2 Small
; 3 Normal
; 4 Extra
; 5 Extreme
; 6 Debug
;
; In the Linux version of CrashMail, it is possible to enter "syslog" as the
; filename. If you do this, everything will be logged to the syslog instead.
LOGFILE "c:\\fido\\logs\\crashmail.log"
LOGLEVEL 5
; DUPEFILE <filename> <maxnumber>
; DUPEMODE BAD/KILL/IGNORE
;
; Here the file that CrashMail uses for its duplicate detection is specified.
; Maxnumber is the maximum number of the messages that should be stored in the
; dupe buffer. Each message in the dupe buffer consumes 8 bytes of RAM and on
; average about 40 bytes of disk space.
;
; These are the available modes for dupe checking:
;
; BAD Dupes are moved to the BAD area
; KILL Dupes are killed
; IGNORE No dupechecking
DUPEFILE "c:\\fido\\logs\\crashmail.dupes" 200
DUPEMODE BAD
; LOOPMODE IGNORE/LOG/LOG+BAD
;
; Loop-mails are netmails that are routed between two systems in an infite
; loop. CrashMail can detect such mails by checking if you system is already
; listed in the ^Via lines of the message. This keyword decides what
; CrashMail should do when such a message is encountered.
;
; IGNORE do nothing at all
; LOG CrashMail logs that it has encountered a loop-mail.
; LOG+BAD CrashMail logs the loop-mail and imports a copy to your BAD area.
; Only the kludges are imported to preserve privacy.
LOOPMODE LOG+BAD
; MAXPKTSIZE <maxsize>
; MAXBUNDLESIZE <maxsize>
;
; Here you can configure the maximum size of the .pkt files and bundles that
; CrashMail generates. If a file grows bigger than this limit, CrashMail
; starts a new bundle/pkt instead. The limits are in KB.
MAXPKTSIZE 50
MAXBUNDLESIZE 100
; DEFAULTZONE <zone>
;
; If CrashMail can't figure out the zone of a message in another way, the
; zone configured here is used.
DEFAULTZONE 2
; NODELIST <path> <type>
;
; This is the nodelist that CrashMail should use. To see the supported
; nodelist formats, type "crashmail version". The meaning of path may
; be different for different nodelist formats.
; Paths
; =====
;
; INBOUND <directory>
;
; The inbound directory is the directory where CrashMail looks for .pkt files
; and bundles to toss.
INBOUND "c:\\fido\\inbound"
; OUTBOUND <directory>
;
; The outbound directory is where CrashMail writes the flow files that tells
; the mailer what files to send.
OUTBOUND "c:\\fido\\outbound"
; TEMPDIR <directory>
;
; This is the directory where CrashMail unpacks incoming bundles.
;
TEMPDIR "c:\\fido\\temp"
; CREATEPKTDIR <directory>
;
; This is the directory where CrashMail stores created .pkt files until they
; are stored in the packet directory.
CREATEPKTDIR "c:\\fido\\temp"
; PACKETDIR <directory>
;
; This is the directory where CrashMail stores generated bundles.
PACKETDIR "c:\\fido\\packets"
; STATSFILE <filename>
;
; This is the file where CrashMail stores statistics about areas and nodes.
; You can display the contents of this file with CrashStats.
STATSFILE "c:\\fido\\crashmail.stats"
; BEFORETOSS <command>
;
; CrashMail will execute this command before a *.pkt file is tossed. You can
; use %f for the filename of the packet. CrashMail will abort tossing if this
; command returns an error.
;BEFORETOSS "cp %f /fido/toss-backup"
; BEFOREPACK
;
; CrashMail will execute this command before a *.pkt file is added to an
; archive. You can use %f for the filename of the packet. If the command
; fails, CrashMail will try again the next time it processes the outbound
; directory.
;BEFOREPACK "cp %f /fido/pack-backup"
; Switches
; ========
;
; STRIPRE
;
; CrashMail should strip all occurences of "Re:", "Re[x]:" and "Re^x:"
; in the subject of messages before they are imported.
;
STRIPRE
; FORCEINTL
;
; CrashMail should add an INTL line to all messages even when the sender
; and the destination are in the same zone.
FORCEINTL
; NOROUTE
;
; CrashMail should never route netmails and just import them instead.
NOROUTE
;
; ANSWERRECEIPT
;
; CrashMail should honor receipt requests.
;
ANSWERRECEIPT
; ANSWERAUDIT
;
; CrashMail should honor audit requests.
;
ANSWERAUDIT
; CHECKSEENBY
;
; CrashMail should never send echomail to nodes that already are in the
; SEEN-BY lines.
CHECKSEENBY
; CHECKPKTDEST
;
; CrashMail should check the destination node of all incoming .pkt files and
; only toss them if they are adressed to one of the local AKAs.
;CHECKPKTDEST
; PATH3D
;
; CrashMail also adds points to ^PATH lines. Not always a good idea since it
; is not allowed in the echomail standard.
PATH3D
; IMPORTEMPTYNETMAIL
;
; Some mailers like FrontDoor like to send meaningless empty netmails with
; no text. Spefify this options if you for some reason want to import such
; mails.
;IMPORTEMPTYNETMAIL
; IMPORTAREAFIX
;
; Use this if you want messages to CrashMail's internal AreaFix to be
; imported to your netmail area.
IMPORTAREAFIX
; NODIRECTATTACH
;
; Normally CrashMail changes all netmail messages with attached file to
; direct status. Use this to turn off this behaviour.
;NODIRECTATTACH
; BOUNCEPOINTS
;
; Use this to bounce netmail messages to non-existing points with one of
; your AKAs as boss.
;BOUNCEPOINTS
; IMPORTSEENBY
;
; Use this if you want to import the SEEN-BY lines.
IMPORTSEENBY
; AREAFIXREMOVE
;
; Use this to allow the AreaFix to remove areas when the last downlink
; unsubscribed.
AREAFIXREMOVE
; WEEKDAYNAMING
;
; Name bundles according to the day of the week they are created.
WEEKDAYNAMING
; ADDTID
;
; Add a ^TID line to all messages exported by CrashMail.
ADDTID
; ALLOWRESCAN
;
; Allow nodes to rescan areas in the AreaFix.
ALLOWRESCAN
; FORWARDPASSTHRU
;
; Make areas created when they were forward-requested by a downlink pass-thru
; rather than importing them to your messagebase.
;FORWARDPASSTHRU
; BOUNCEHEADERONLY
;
; Only write the header and do not include message text when messages are
; bounced.
;BOUNCEHEADERONLY
; REMOVEWHENFEED
;
; CrashMail should remove areas when the feed unsubscribes to them. AreaFix
; messages or notification messages can be sent to your downlinks, see the
; Node configuration.
;REMOVEWHENFEED
; INCLUDEFORWARD
;
; Include all forward-requestable areas in the area lists generated by the
; AreaFix.
INCLUDEFORWARD
; NOMAXOUTBOUNDZONE
;
; CrashMail normally puts outgoing mail for all zones >4095 in the outbound
; directory for zone 4095 (usually outbound.fff). If this switch is turned
; on, CrashMail will use separate outbound directories also for zones >4095.
; The background of this option is that the Binkley outbound style originated
; on platforms where file names were limited to 8+3 characters. For
; compatibility with many older mailers, leave this switch turned off.
; There are however some mailers that also expect to find mail for zones
; >4095 in separate outbound directories.
;NOMAXOUTBOUNDZONE
; ALLOWKILLSENT
;
; If this option is used, CrashMail will delete all netmail messages with
; the killsent flag after they have been expored
;ALLOWKILLSENT
; FLOWCRLF
;
; If this option is used, CrashMail writes CRLF as the end-of-line character
; in flow files instead of just LF. Apparently some mailers need this.
;FLOWCRLF
; NOEXPORTNETMAIL
;
; If this option is used, CrashMail will skip netmail areas when using the
; SCAN or SCANLIST arguments. Use this if you want to use another program
; to handle netmail.
;NOEXPORTNETMAIL
; Groupnames
; ==========
;
; GROUPNAME <letter> <description>
;
; Here you can describe you groups. These descriptions are used in the area
; lists created by the AreaFix.
GROUPNAME A "Molia"
GROUPNAME H "Lokala"
; Bounce
; ======
;
; BOUNCE <pattern1> <pattern2> ...
;
; Bounce messages that match one of these pattern if the destination node
; doesn't exist in the nodelist. This only works if you use a nodelist with
; CrashMail. You can have multiple BOUNCE lines.
BOUNCE "1:*/*.*" "2:*/*.*" "3:*/*.*" "4:*/*.*" "5:*/*.*" "6:*/*.*"
; Fileattach
; ==========
;
; FILEATTACH <pattern1> <pattern2> ...
;
; CrashMail will refuse to route files to nodes that are not configured
; here and will send a bounce messages. Multiple FILEATTACH lines are
; allowed.
FILEATTACH "2:200/207.5"
; Change
; ======
;
; CHANGE <old flavour> <pattern> <new flavour>
;
; CrashMail can change the flavour (also known as priority) of netmail. Note
; that this does not affect echomail.
;CHANGE * 2:200/207.5 Hold
;CHANGE Normal,Direct 2:200/*.* Crash
; Packers
; =======
;
; PACKER <name> <pack command> <unpack command> <recog>
;
; Here you configure the external packers that CrashMail uses. %a stands for
; archive name and %f stands for file name. The recog string is used when
; CrashMail detects the packer used to pack a bundle. If the beginning of
; the bundle matches the recog string, CrashMail uses that packer. ? can be
; used as a wildcard and you can use $xx to specify a hexadecimal number.
PACKER "LHA" "c:\\fido\\bin\\lha a %a %f" "c:\\fido\\bin\\lha x %a" "??-lh?-"
PACKER "ZIP" "c:\\fido\\bin\\pkzip %a %f" "c:\\fido\\bin\\pkunzip %a" "PK"
; AKA
; ===
;
; AKA <node>
; DOMAIN <domain>
; ADDNODE node1 node2 ...
; REMNODE nodepattern1 nodepattern2 ...
;
; Here you configure the adresses of your node. ADDNODE is used to add nodes
; the the SEEN-BY lines in areas with this AKA and REMNODE is used to remove
; nodes. Nodes for ADDNODE and REMNODE has to be 2D, that is only net/node
; should be specified. Patterns are allowed for REMNODE.
AKA 2:200/207.6
DOMAIN "FidoNet"
AKA 2:200/108.7
DOMAIN "FidoNet"
; Nodes
; =====
;
; NODE <node> <packer name> <packet password> [<flags>]
; PKTFROM <node>
; AREAFIXINFO <areafix password> <groups> <read-only groups> <add groups>
; DEFAULTGROUP <group>
; REMOTEAF <areafix name> <areafix password> [NEEDSPLUS]
; REMOTESYSOP <name>
;
; These are the nodes you interchange mail with. You can only send echomail
; to nodes specified here, but netmail can also be sent to other nodes.
;
; If PKTFROM is used, the node specified there will be used as the originating
; node in all packet files sent to this node.
;
; The groups decide what areas a node may subscribe to in the AreaFix. If the
; area is in one of the read-only groups, the node will be added as read-only.
; If a new area is added in one of the add groups, this node will automatically
; be subscribed to it. The default group is the group used for areas that are
; autoadded from this node.
;
; REMOTEAF and REMOTESYSOP are used when CrashMail needs to send messages to
; the AreaFix or the sysop of this node. Use NEEDSPLUS if the remote AreaFix
; needs commands wants "+area" when subscribing to new areas instead of just
; "area".
;
; The following flags can be set for a node:
;
; NOTIFY
;
; When a SENDQUERY, SENDLIST, SENDUNLINKED, SENDINFO or SENDHELP with the
; argument ALL is used on the command-line, messages will be sent to all
; nodes with this flag set.
;
; PASSIVE
;
; Echomail is never sent to this node. Used for the %PAUSE and %RESUME
; commands in the AreaFix.
;
; NOSEENBY
;
; No SEEN-BY lines are included in messages sent to this node. Should
; normally not be used.
;
; TINYSEENBY
;
; Only sender and destination is included in SEEN-BY lines in messages
; sent to this node. Should normally not be used.
;
; FORWARDREQ
;
; This node is allowed to do forward-requests.
;
; PACKNETMAIL
;
; Netmail to this node should be packed along with the echomail.
;
; SENDAREAFIX
;
; AreaFix disconnect requests should be sent to this node when the feed
; unsubscribes from an area.
;
; SENDTEXT
;
; Notification messages should be sent to the sysop of this node when the
; feed unsubscribes from an area.
;
; AUTOADD
;
; New areas from this node should be auto-added to the configuration. If
; auto-add is not set, the areas will still be added but with an UNCONFIRMED
; line.
;
; CRASH
;
; Send echomail to this node with priority Crash.
;
; DIRECT
;
; Send echomail to this node with priority Direct.
;
; HOLD
;
; Send echomail to this node with priority Hold.
;
NODE 2:200/100.0 "ZIP" "" PACKNETMAIL AUTOADD
DEFAULTGROUP A
NODE 2:201/128.0 "ZIP" "" PACKNETMAIL AUTOADD
DEFAULTGROUP B
NODE 2:200/207.5 "LHA" "secret" NOTIFY FORWARDREQ PACKNETMAIL AUTOADD
AREAFIXINFO "secret" "" "" ""
REMOTESYSOP "Johannes Nilsson"
; AreaFix
; =======
;
; AREAFIXHELP <filename>
;
; The file that is sent when a downlink issues a %HELP command.
AREAFIXHELP "c:\\fido\\AreafixHelp.txt"
; AREAFIXMAXLINES <max>
;
; The maximum number of lines in an AreaFix response. CrashMail splits the
; response if it exceeds this number.
;
AREAFIXMAXLINES 50
; AREAFIXNAME <name>
;
; A name that CrashMail's AreaFix should respond to.
AREAFIXNAME "AreaFix"
AREAFIXNAME "AreaMgr"
AREAFIXNAME "CrashMail"
; AREALIST <node> <file name> [GROUP <group>] [FORWARD] [DESC]
;
; This is a list of the areas that are available at a node. It should contain
; lines with the format "<tagname> <description>". If DESC is specified,
; descriptions are taken from this file when CrashMail auto-adds areas. If
; FORWARD is specified, this file is used to determine what files are
; available for forward-requests. GROUP specifies the group needed to be
; allowed to forward-requests areas in this list.
AREALIST 2:200/100.0 "c:\\fido\\lists\\R20Desc.lst" GROUP A FORWARD DESC
; Routing
; =======
;
; ROUTE <pattern> <destination pattern> <aka>
;
; Netmail messages with a destination that match the pattern are routed to
; the destination pattern using the specified AKA. See descriptions of how
; patterns work elsewhere.
ROUTE "2:200/207.5" "2:200/207.5" 2:200/108.7
ROUTE "2:200/*.*" "2:200/100.0" 2:200/108.7
ROUTE "*:*/*.*" "2:201/128.0" 2:200/108.7
; MSG
; ===
;
; MSG_HIGHWATER
;
; Use 1.msg as highwater mark in *.msg areas.
MSG_HIGHWATER
; MSG_WRITEBACK
;
; Overwrite the old message with the new message when it is imported instead
; of just changing the SENT flag. Use this to see the new SEEN-BY:s and PATH
; in the messagebase.
;MSG_WRITEBACK
; JAM
; ===
;
; JAM_HIGHWATER
;
; Use highwater marks to speed up scanning. The highwater mark is stored in
; a file called <basename>.cmhw.
JAM_HIGHWATER
; JAM_LINK
;
; Do reply-linking based on MSGID and REPLY after import.
JAM_LINK
; JAM_QUICKLINK
;
; Just compare the CRC of MSGID/REPLY when linking and don't read the strings
; from the messagebase. This makes linking quicker, but messages that don't
; match may be linked by mistake.
;
JAM_QUICKLINK
; JAM_MAXOPEN <max>
;
; This is the number of JAM messagebases that CrashMail keeps open at a time.
; A higher number speeds up tossing, but since CrashMail keeps four files
; open for each area, don't use a too high number if you only can have a
; limited number of files open...
JAM_MAXOPEN 5
; Filter
; ======
;
; CrashMail has a message filter that can be used for filtering out messages
; that match the specified criteria and perform a number of commands on them.
; See file doc/filter.txt for a complete description of the message filter.
;
; General syntax:
;
; FILTER <expression>
; <command 1>
; <command 2>
; ...
;FILTER SOURCE=TOSSED and TYPE=ECHOMAIL and TONAME="Johan Billing"
;COPY PERSONAL_MESSAGES
; Areas
; =====
;
; AREA/NETMAIL/LOCALAREA <tagname> <aka> [<messagebase> <path>]
; IMPORT/EXPORT <node1> <node2> ...
; BANNED <node1> <node2> ...
; DESCRIPTION <desc>
; GROUP <group>
; KEEPNUM <num>
; KEEPDAYS <num>
; UNCONFIRMED
; MANDATORY
; DEFREADONLY
; IGNOREDUPES
; IGNORESEENBY
;
; Here you configure all areas that CrashMail knows. Area definitions begin
; with AREA for echomail areas and NETMAIL for netmail areas. Local areas
; defined with LOCALAREA are not used by CrashMail, but are included in
; config files created by CrashExport and are maintained when running
; CrashMaint.
;
; To see the supported messagebase formats in your version of CrashMail,
; type "crashmail version". What path should be used depends on the used
; messagebase formats.
;
; Netmail messages addressed to the Aka or to one of the nodes specified on
; an IMPORT line are imported in netmail areas. Echomail areas cannot have
; an IMPORT line but instead has one or more EXPORT lines where the nodes
; that this area should be sent to are listed. Each node on an export line
; has the format "[<modifier>]<node>" where modifier may be !, @ or %.
; ! means that the node is read-only, @ means that the node is write-only
; and % means that the node is the feed for this area.
;
; Note that nodes on the EXPORT line may be abbreviated. And example:
;
; EXPORT 2:2/2 1 .5 3/2 .22 3 .33
;
; will be expanded to
;
; EXPORT 2:2/2 2:2/1 2:2/1.5 2:3/2 2:3/2.22 2:3/3 2:3/3.33
;
; Nodes in the BANNED line may not subscribe to this area with the AreaFix.
; MANDATORY means that nodes may not unsubscribe from this area in the
; AreaFix. DEFREADONLY means that nodes that subscribe to this area in the
; AreaFix will be added as read-only.
;
; Areas with UNCONFIRMED are areas that have been auto-added by CrashMail
; but not yet confirmed. Areas get this flag when the node didn't have the
; flag AUTOADD set. CrashMail treats unconfirmed areas as if they didn't
; exist at all.
; KEEPNUM and KEEPDAYS are used by CrashMaint to decide how long messages
; should be kept in the messagebase.
;
; An area with the tagname BAD is a special area that are used for messages
; that for some reason are considered "bad" by CrashMail.
;
; Another special kind of areas are the default areas. When CrashMail adds
; an area, it searches for a default area to use as a template. First it
; looks for an area named DEFAULT_<groups> where <groups> contains the group
; of the new area. If such an area doesn't exist, it looks for an area called
; DEFAULT. If a default area was found, CrashMail copies this configuration
; for this area to the new area. In the path of the default area, you can
; use the following %-codes:
;
; %a Name of the area
; %l Name of the area in lowercase letters
; %8 Eight digit serial number
;
; You must use one of these %-codes or the new path will not be unique.
NETMAIL "NETMAIL" 2:200/108.7 JAM "c:\\fido\\areas\\NETMAIL"
AREA "BAD" 2:200/108.7 JAM "c:\\fido\\areas\\BAD"
AREA "DEFAULT_A" 2:200/108.7 JAM "c:\\fido\\areas\\%8"
AREA "R20_INTRESSE" 2:200/108.7 JAM "c:\\fido\\areas\\36124179"
EXPORT %2:200/100.0
DESCRIPTION "Intresseklubben"
GROUP A
AREA "R20_TRASHCAN" 2:200/108.7 JAM "c:\\fido\\areas\\3612417a"
EXPORT %2:200/100.0
DESCRIPTION "Soptunnan"
GROUP A

View File

@@ -0,0 +1,296 @@
Description of the message filter in CrashMail II
=================================================
Introduction
------------
The message filter makes it possible filter out messages that match a set of
critera and perform a number of commands on them. All messages that are handled
by CrashMail are checked against the filter statements in the configuration.
Filter statements have this general syntax in the configuration:
FILTER <expression>
<command 1>
<command 2>
...
This file will start by describing how expressions work and what variables
you can use in them and then continue by describing the available commands.
This file relies heavily on examples to describe how the filter works.
Expressions
-----------
Expressions have this general syntax:
<variable><operator><pattern>
CrashMail understands the operator "=" for all variable types expect text
variables and also "|"(substring search) for string and text variables.
Boolean variables can be used without an operator in which case "variable"
equals "variable=TRUE". You cannot have space characters around the operator,
CrashMail will not understand for example "FILEATTACH = TRUE".
A few examples:
TONAME="Johan Billing"
SUBJECT=CrashMail
TEXT|"CrashMail"
TOLOCALAKA
If the variable matches the pattern, the expression is TRUE and the commands
for the filter will be performed. You can also use NOT to negate a statement
and perform the commands if the expression is not true:
NOT FROMNAME="AreaFix"
Expressions can be linked using AND and OR. Parentheses can be used to set
the evaluation order. (Default is evaluation from left to right.) Examples:
TYPE=NETMAIL and TOLOCALAKA and TONAME=Raid
TYPE=ECHOMAIL and (TONAME="Johan Billing" or TONAME="Billing Johan")
TYPE=NETMAIL and NOT (FROMNAME=AreaFix or FROMNAME=Raid)
Variables
---------
String variables
FROMNAME
TONAME
SUBJECT
AREA
TYPE
SOURCE
FROMNAME, TONAME and SUBJECT should be self-explanatory. AREA is the tagname
of the area for echomail messages and for netmail messages it will be empty.
TYPE can be either NETMAIL or ECHOMAIL. SOURCE describes where the message
came from and can have these values:
TOSSED message was read from a *.pkt file
EXPORTED message was exported from a messagebase
CRASHMAIL message was generated by CrashMail (bounce messages, AreaFix
responses etc)
The "=" operator matches a variable against a pattern (see description of
CrashMail's patterns in ReadMe.txt). "|" makes a substring search.
Examples:
FROMNAME=Johan*
SOURCE=CRASHMAIL
SUBJECT|AreaFix
Node variables
FROMADDR
TOADDR
For netmail messages, these are the addresses found in the message header.
For echomail messages, FROMADDR is taken from the Origin line and TOADDR
will be empty.
Node variables are matched against a node pattern using the "=" operator.
Examples:
FROMADDR="1:*/*.*"
TOADDR="2:200/207.6"
Text variables
TEXT
KLUDGES
TEXT is the message text without kludges and KLUDGES contains all the kludges
(lines beginning with 0x01). You can only do substring searches on text
variables using the "|" operator.
Examples:
TEXT|CrashMail
KLUDGES|"TID: CrashMail"
Boolean variables
FILEATTACH
TOLOCALAKA
FROMLOCALAKA
TOLOCALPOINT
FROMLOCALPOINT
EXISTSCFG_FROMADDR
EXISTSCFG_FROMBOSS
EXISTSCFG_TOADDR
EXISTSCFG_TOBOSS
EXISTSNL_FROMADDR
EXISTSNL_FROMBOSS
EXISTSNL_TOADDR
EXISTSNL_TOBOSS
Boolean variables are always TRUE or FALSE. Boolean variables can be used
either alone (variable and variable=TRUE is the same thing) or as
variable=TRUE/FALSE.
FILEATTACH will be TRUE if the message has an attached file.
FROMLOCALAKA/TOLOCALAKA will be TRUE if the message is from/to one of the
AKAs configured in the configuration file. FROMLOCALPOINT/TOLOCALPOINT will
be TRUE if the message is from/to a point under one of the AKAs configured
in the configuration file.
EXISTSCFG_FROMADDR will be TRUE if the message is from an address configured
as a NODE in the configuration file. EXISTSCFG_FROMBOSS is similar, but if
the node is a point (x:y/z.p), CrashMail will look for the boss (x:y/z.0) in
the node configuration instead. EXISTSCFG_TOADDR/EXISTSCFG_TOBOSS are similar,
but for the destination address.
EXISTSNL_* are similar to EXISTSCFG_*, but instead of looking for the nodes
in the node configuration, the variable will only the TRUE if the node is
found in the external nodelist.
Examples:
TOLOCALAKA or TOLOCALAKA=TRUE (equivalent)
FROMLOCALPOINT=FALSE or NOT FROMLOCALPOINT (equivalent)
Commands
--------
TWIT
Don't import the message. The message will be sent to downlinks as usual.
Example:
FILTER TYPE=ECHOMAIL and FROMNAME="Hubba Hopp"
TWIT
KILL
Completely discard the message.
Example:
FILTER SOURCE=CRASHMAIL
KILL
COPY <area>
Write a copy of the message to a local area. The local area needs to be
configured in the configuration using LOCALAREA.
Example:
FILTER SOURCE=TOSSED and TYPE=ECHOMAIL and TONAME="Johan Billing"
COPY PERSONAL_MESSAGES
EXECUTE <command>
Executes an external command. The following codes can be used in the command:
%r RFC-style with Fidonet addresses. Name of a file that contains a
message in a text format similar to that used for e-mail messages on
the internet, but addresses are still in x:x/x.x@domain format.
%R RFC-style with RFC-style addresses. Name of a file that contains a
message in a text format similar to that used for e-mail messages on
the internet, but addresses are in name@pX.fX.nX.zX.domain format.
%m Name of a file that contains the message as a *.msg file
%a Area name (echomail only, will be empty for netmail areas)
%f From name
%o Originating node
%t To name
%d Destination node
%s Subject
%x Date and time of the message
CrashMail will react differently depending on the exit code of the executed
command:
0 The message is not imported
10 The message is imported
20 CrashMail aborts
Example:
FILTER TYPE=NETMAIL and TOLOCALAKA and TONAME="Raid"
EXECUTE "raid %r"
WRITELOG <message>
Writes a message to the logfile (loglevel 1). The same %-codes as for the
EXECUTE command can be used here as well except for %r, %R and %m.
Example:
FILTER TYPE=ECHOMAIL and SOURCE=TOSSED
WRITELOG "From: %f Subj: %s Area: %a"
WRITEBAD <reason>
Writes the message to the BAD area with <reason> specified as the reason. The
message is not deleted unless you also use the KILL command.
FILTER TYPE=NETMAIL and NOT EXISTSNL_TOBOSS
WRITEBAD "Warning: Destination not in nodelist, message might not arrive"
BOUNCEMSG <message>
BOUNCEHEADER <message>
These commands writes an error message to the sender of the filtered message.
BOUNCEMSG includes a full copy of the original message and BOUNCEHEADER only
includes the message header. In the message to the sender, you can use the
same %-codes as for the EXECUTE command except for %r, %R and %m. The message
will not be deleted unless you also use the KILL command.
Example:
FILTER TYPE=NETMAIL and not TOLOCALAKA and not EXISTSCFG_TOADDR
BOUNCEMSG "Destination node %d does not exist, message can not be delivered"
KILL
REMAPMSG <new name> <destination pattern>
This command can change the destination name and node of a netmail message. If
the new name is "*", the old name will be kept.
Examples:
FILTER TYPE=NETMAIL and TOLOCALAKA and TONAME="Johannes"
REMAPMSG "Johannes Nilsson" 2:200/2075
FILTER TYPE=NETMAIL and TOADDR=2:999/*.*
REMAPMSG "*" 2:200/*.*
Additional examples
-------------------
Copy all talk about me to a special area:
FILTER TYPE=ECHOMAIL and SOURCE=TOSSED and TEXT|billing
COPY BILLING_DISCUSSIONS
Keep a copy of all sent netmails:
FILTER TYPE=NETMAIL and SOURCE=EXPORTED
COPY SENT_NETMAILS
Log all routed messages:
FILTER TYPE=NETMAIL and SOURCE=TOSSED
WRITELOG "Routed message from %f (%o) to %t (%d)"
Search all messages for a string:
FILTER TEXT|CrashMail
COPY CRASHMAIL_DISCUSSIONS
Make customized bounce messages:
FILTER TYPE=NETMAIL AND NOT EXISTSNL_TOBOSS
BOUNCEMSG "Destination node %d does not exist in nodelist, your message cannot be delivered"
KILL
Make it possible to inspect all messages generated by CrashMail:
FILTER SOURCE=CRASHMAIL
COPY CRASHMAIL_MESSAGES