Last update 01-May-2000

# mbfido, the fidonet mail and files processor.

###

SYNOPSIS

    Usage: mbfido [command(s)] <options>

    	Commands are:

    	notify <nodes>	Send notify messages
    	roll		Rollover statistic counters
    	scan		Scan outgoing Fido mail
    	tag		Create taglists
    	test		Do some testing
    	tic		Process .tic files
    	toss		Toss incoming Fido mail

    	Options are:

    	-full		Full Mailscan
    	-nocrc		Skip CRC checking
    	-nodupe		Skip dupe checking
    	-quiet		Quiet mode
    	-unsecure	Toss unsecure
    	-unprotect	Toss unprotected inbound

###

DESCRIPTION

mbfido is the program to process fidonet mail and files. In order to run mbfido you must first start mbsed, this is the deamon which controls all bbs activities. To prevent that mbfido will run more than once at the same time a lock is placed in the protected inbound with the pid of the running mbfido program.

###

SPECIFICATIONS

    * Can handle messages of maximum 429467295 bytes, or less if you have less
      memory available, the practical limit is about 1 Meg. Note that most mail-
      processors are only guaranteed to work to maximum 16 KBytes.
      Recent experiments in the LINUX echo show that this is still true,
      although most tossers seem to process mail up to 32 KBytes.

###

COMMANDS

`mbfido notify <nodes>` This command will send notify messages to all nodes in your setup which have the notify option set to on. If you enter nodes as option you may use wilcards, ie 2:*/* to send messages to all nodes in zone 2. If you specify exactly one node, messages will be generated even if that node has the notify function off. From cron you should not specify any nodes, this will just send to all your links the information about their setup. Each node will receive a status report for files and mail, and area list for all file areas and mail areas to each aka a node has, and a flow report for mail for each aka.

`mbfido roll` Only run the test if a new week or month is started. If one of these is true the statistic records in several databases are updated. You should run this command at midnight from cron to be sure that this happens every night. This command is always executed before one of the scan, toss or tic commands.

`mbfido scan` Scan for new messages entered at the bbs or by other utilities. If the file ~/tmp/echomail.jam or ~/tmp/netmail.jam exists, mbfido will only scan the messages in areas which are pointed at in this file. This is a lot faster then a full mailscan. If it is not present, all messagebases are scanned to see if there is a new message. If you specify -full on the commandline a full messagebase scan is forced. It is wise to do this sometimes, on my bbs I run this once a day.

`mbfido tag` The command will create tag- and areas files in the doc directory for each group of mail and files.

`mbfido test` This is for testing of the mail routing. In the source "tracker.c" I have included a list of nodes that will be tested. This is for development only, but it might be handy for you to test your netmail routing.

`mbfido tic` Process incoming files accompanied with .tic control files. Several actions can take place on the incoming file before they are imported in the BBS areas. Options are rearchiving, replacing banners (with your add), check for DOS viruses, running scripts for certain filename patterns, send these files to other nodes etc. All options can be defined for each area. If as a result from one of the actions there are new files hatched, for example after processing a nodelist difference file which created a new nodelist, the .tic processing will start again, until there is really nothing more to do.

`mbfido toss` Toss incoming fidonet netmail and or echomail. By default mail in the protected inbound directory will be processed, uncompressed .pkt files and compressed arcmail bundles are recognized, filename case doesn't matter.

###

TOSSING MAIL

First make sure you have the necessary message areas in your setup. At least you need the badmail and dupemail areas and a netmail area for each network you participate in. If you don't create badmail and dupemail areas then bad (unknown area etc) and dupes are lost and you cannot check the reason why. If you don't create the netmail areas for each network, then netmail to your system will dissapear. It is not possible to "retoss" the badmail yet after you have created any missing echomail areas.

To prevent .pkt name collision the toss of incoming mail is done in parts. The first run is to process all uncompressed mailpackets and add mail to the outbound. Then each compressed ARCmail archive will be uncompressed and processed and mail will be imported and forwarded as necessary. During all these passes all filenames are sorted by date and time, the oldest files are processed first.

The recognized mail packets are type 2+ following the FSC-0039 standard with a fallback to the old stone age packets. The packets are checked for being addressed to one of your own aka's and for a correct password. The password check may be switched off in the nodes setup. After all the packet header checks the messages will be extracted from the packet file.

When messages are extracted from the packets, the date format is checked for Year2000 bugs from other tossers. Several checks are done by ideas of Tobias Ernst of 2:2476/418. It is also possible to run the pktdate utility before each packet will be processed. Whatever date format us used in the original message, mbfido will always rewrite the date field in the right FTS-0001 format.

If the message is a netmail the message is checked for DOMAIN, INTL, FMPT and TOPT kludges so that full 4d or 5d addressing will be possible. Then a check is done if this netmail is addressed to one of our aka's. If the domain part of the netmail addressee is not our own domain, it is assumed that it must be gated to internet, the netmail will be converted to RFC... and fed to sendmail. This is not implemeneted yet.
If the message is to our domain, processing continues. If it's addressed to "sysop" or "postmaster" the name is replaced with the sysop's name. If the message is addressed to one of the areamgr or filemgr names the message will be given to that manager.
Then the message is checked if it is addressed to an existing bbs user, and if so it will be imported into the netmail area of the main zone of the bbs. If it's not addressed to a bbs user, but is a valid unix account on your host the message will be posted locally. (must be implemented). If the message is not for one of our aka's the message will be put in the mailqueue for further routing.

If the message is a echomail message it will be checked for being a duplicate by storing the CRC32 value of the AREA: line, message subject, origin line, message date and msgid kludge and testing if that CRC32 value exists in the echomail duplicate database. Also the existance of the echomail area is checked and the node must be linked to that area. If the message is not in a passthru area and is not a duplicate it is finally imported in the message base. After that is the message will be forwarded to downlinks by adding the message to the mailqueue.

###

ADDING MAIL TO THE OUTBOUND

Adding mail to the outbound is done in two passes. The first pass is to put all outgoing mail into the ~/tmp directory, these files are named z.n.n.p.ext The extension can be qqq for packed mail, nnn for normal unpacked mail, hhh for hold unpacked mail and ccc for crash unpacked mail. Adding mail to this tmp directory can allways be done, even if one of the nodes you are adding mail for is having a mail session with your system.
In the second pass, these temp files are really added to the outbound, but only if the destination node is not locked, ie. there is no current mailsession with that node. If there is a mail session going, these temp files will stay in the temp directory and are added to the outbound in a later run of mbfido. If adding the mail to the outbound was successfull the temporary file is removed.

###

OPTIONS

`mbfido [command] -nocrc` Disable CRC checking of incoming TIC files. Only use this if you know what you are doing.

`mbfido scan -full` Force scanning of all message bases for new entered mail. You need this if mail in entered with other editors then from mbse. Also, running it once a day is adviced to catch any missed messages.

`mbfido [command] -nodupe` Disable checking for duplicate's. Normally you should not use this switch.

`mbfido [command] -quiet` Quiet mode, all output to the current tty is supressed. Use this flag if you toss mail from a script (started by cron) after mail is received.

`mbfido toss -unsecure` Toss mail without checking if the echomail is for your own system en without checking if the sending node is connected to your system. Nodes who are excluded from a certain echo, can stil not enter messages in that echo.

`mbfido [command] -unprotect` Toss from the unprotected inbound directory. The default is to toss from the protected inbound directory.

###

ENVIRONMENT

In order to run the bbs you need to set one global environment variable $MBSE_ROOT This variable must point to the root of the bbs directoy structure.

###

BUGS

Please report bugs, misspelled documentations etc. to the author. Known problem: it can't handle netmail from D'Bridge [1a] version 1.58. The .pkt file isn't terminated with a zero word, the netmail isn't terminated with character '\0'. The netmail is imported and the .pkt file is renamed to .bad There are still bugs, this program is under development.

Back to index Back to Main index