FreqTrim

What is FREQTRIM good for

FIDO netmail messages with FileRequest flag set ought to contain no text at all. The mailer on target node can kill such empty message after successfull transmission of requested files. Alas, some offline message editors do not allow message body to be empty. Origin lines, tear lines, empty lines and other garbage is appended to the file requesting netmail very often when it is written by BBS online users or certain QWK offline editors. Such file request persists on the target node until deleted manually by Sysop.

You can avoid sending bad freq-mail from your BBS users or from yourself if you decide to use FREQTRIM. This utility checks outgoing netmail for file requests and removes all the text from its body. The removed text is put on standard output and, optionally, to the log file.

FREQTRIM should be run from the batch file after each echoprocessor SCAN command, i.e. when a new netmail is exported from the message base. Two parameters are provided from the command line:

  1. the netmail directory, i.e. where the *.MSG files are kept before packeting
  2. the name of the log file (may be omitted)

How does FREQTRIM work

FREQTRIM checks every *.MSG file in the netmail directory where * is any decadic number. Then it looks at msg attributes. If the message has FileRequest or FileUpdateRequest flag set and does not have Received, Sent, Orphan or InTransit flag set, it is scanned for the text. Unwanted text is removed and the message is rewritten. The original message is kept as *.BAK. If you don't want to keep backup files, simply put DEL *.BAK after the FREQTRIM command. Short information is logged: the name of the sender, target FIDO address, subject of the message (requested files) and the text which was removed. Message header and kludge lines are not changed. If no log file is specified, the info goes only to the standard output, usually the console. You can check the errorlevel and let the BBS send a warning message to you if some user has posted bad freq netmail:

   FMAIL SCAN
   DEL WARNING.TXT
   FREQTRIM \BBS\FD\NETMAIL WARNING.TXT
   IF NOT ERRORLEVEL 2 GOTO :NothingHappened
   DEL \BBS\FD\NETMAIL\*.BAK
   FTOOLS POST WARNING.TXT SysopArea -from"FREQTRIM" -to"Sysop"
:NothingHappened

License agreement

FREQTRIM is freeware distributed "as is". Comments and bug reports are welcome via FIDO Pavel Srubar (2:421/71).