DetMail - Detach/Remove attached files from your MR/2 ICE
This program is released as freeware and is copyright © 1997 by
Art Heimsoth - all rights are reserved. It may be freely distributed,
modified, and used, provided if distributed, it is distributed with all
files included and a listing of the changes indicated (if any). No fees
may be charged for its distribution or use other than nominal distribution
costs associated with its distribution.
The intent of this command file is to allow the extraction and removal of
any MIME Base64, UUEncoded or XXEncoded files from a MR/2 ICE mail item.
The command file has several options, which, along with an option file,
are intended to provide sufficient options to allow you to do what you
want with the mail items that have attached files.
The included DetMFlt.CMD is a filter that also can be used to extract and
remove the attachments, but used as a filter with MR/2 ICE. Both commands
use the same option file (see later). The DetMail command also allows the
options to be passed on the command line. These same command line options
can instead be provided via the option file and used by DetMail and DetMFlt.
The included command options are:
- This will cause a listing of all attached files found in all accounts
and all folders. The listing will include the attached file name along
with which account and folder, and if the mail item was sent, who it
was sent to, but if received, who sent it to you. If you only want
to extract some files, or only want to remove some files from the
mail items, then this file should be edited and used as input for a
subsequent pass. The list file will be created in the root directory
of where the mail is located and will have the name of this command
with a file type of .LST. This is not used by the filter.
- This is the default if /Remove is not provided, and prevents the
attached file from being removed from the mail item.
- Remove all attached files from the mail item(s). If a list file was
not provided as input, then all attached files in all all mail items
checked will be removed from the mail item and deleted. The attached
file will no longer be available unless /Extract is also requested, or
unless the attached file has previously been detached and saved. If
a list file is supplied as input to DetMail, only those files indicated
in the list file will be checked. If no list file was supplied, then
the files that are checked is controlled by the Account_list and the
Folder_list options in the option file. If DetMFlt is being used, only
the passed filename will be processed.
- Detatch all attached files from the mail item(s). If a list file was
not provided as input, then all attached files in all mail items that
are checked will be detached and saved. The file will be saved according
to the Save_directory option in the option file, or in the mr2i\Attached
as the default. A text line will be inserted in the mail item giving
the full file name that was used to save the extracted file. The date/time
of the saved file will be the data/time of the mail item as indicated
in the mail header. If a later dated file already exists, it will
not be replaced, and no extraction will be performed. If a list file
is supplied as input, only those files indicated in the list file will
detached (extracted) and saved. If DetMFlt is being used, only the
passed filename will be processed.
- The name of the list file to be used for input to the command. The
file has a very specific format, and should first be created by using
the /List option with no other options. If this option is specified
along with the /List option, the name of this file cannot be the
same as what would be generated with the /List option. This parameter
can only be provided as a command line option to DetMail; i.e., it
cannot be in the option file, and is not available to be used with the
The option file is named DetMail.OPT and contains a list of additional
global options to be used, such as selecting the specific accounts and
folders to be processed, where to place the extracted files, whether to
process the sent or received mail, or both. The option file included in
the DetMail.ZIP contains all of the options that are available and their
descriptions. This option file must be found in the same directory where
the DetMail.CMD and the DetMFlt.CMD file is located.
The filter, DetMFlt.CMD can be used as an input filter or as a demand
filter. Currently if it is used as an outbound filter, any mail that
has an attachment will be sent twice. I currently do not know a way
around this problem.
The content of the distributed DetMail.ZIP file is:
- Overview description - read before using DetMail
- the Rexx command file to be executed
- the Rexx filter command file
- a set of Rexx helpers used by the DetMail.CMD
- the option file for DetMail and DetMFlt, rename this to
DetMail.OPT if other than the defaults are desired
- a list of what changes have been made
All problems, comments, and suggestions should be sent to Art Heimsoth
at email@example.com. All such mail received will be responded to
as quickly as I can.