ANNOUNCE: ifmaprequest-0.1

Roland Rosenfeld (MSD)
27 Sep 1996 17:18:05 +0200

Hi!

I wrote a little patch to ifcico to allow filerequests from a map of
files, to bypass the problem with long filenames and pathes on DOS
machines.

You can get this program at
ftp://sunrise.cs.uni-bonn.de/pub/linux/fido/ifmaprequest-0.1.tar.gz

or via filerequest from 2:2450/42 (a good chance to test it, because
I'm running the patched ifcico ;-) ) with the name IFMPRQ01.TGZ (case
insensitive) or unix/fido/ifmail/ifmaprequest-0.1.tar.gz (case
sensitive).

Here's the README:

------------------------------ schipp --------------------------------

I F M A P R E Q E S T
=======================

(c) 1996 Roland Rosenfeld <roland@spinnaker.rhein.de> 2:2450/42

This package provides a patch for ifcico 2.8f-tx7.7 from the package
ifmail 2.8f-tx7.7 package, which allows you to create an ascii file
that maps 8+3-filename-requests (used in DOS-environments) to real
filenames (with path).

Installation:

Install the sources of ifmail 2.8f-tx7.7 and apply maprequest.patch to
it. This won't change the normal behaviour of ifcico, so don't fear!

Now ifcico recognizes a new statement in its config-File:
reqmap /usr/local/lib/fnet/reqmap
This points to the new request-map-file. Every line in the request
map should look like these:

foobar.tgz some/where/foobar-long-1.2.3.tar.gz
barfoo.taz /home/ftp/pub/else/where/bar-foo.tar.Z

On the left side you see the 8+3 short filename, which can be
requested und which will be sent to the requester. On the right side
you see the real name and path of the file. If the path does not
begin with a slash ('/'), ifcico will prepend the pubdir (also defined
in ifcico's config file) to it.

The short filenames need to be lowercase, otherwise they won't be
found.

The search of an requested file is not casesensitive and usual
wildcards ('*', '?') are allowd. If more than one entry of reqmap
matches the requested file, they are all sent.

Duplicates in reqmap are allowed, but use them carfully:
If your reqmap looks like this:

foobar.tgz some/where/foo-bar-1.2.3.tar.gz
foobar.tgz else/where/foo-bar-2.3.4.tar.gz

ifcico will send both files (both as foobar.tgz) to the requesting
system (the receiving mailer has to take care that they are stored as
two different files).

Another example:

foobar.tgz some/where/foo-bar-1.2.3.tar.gz
foobar.tgz some/where/foo-bar-1.2.3.tar.gz

will send the same file twice (not very usefull).

And a last:

foobar.tgz some/where/foo-bar-1.2.3.tar.gz
fooba123.tgz some/where/foo-bar-1.2.3.tar.gz
foo-bar-1.2.3.tar.gz some/where/foo-bar-1.2.3.tar.gz

Allows to request one file with different names.
As you can see this offers filerequest to long unix filenames without
path with a corrosponding reqmap.

You can use spaces and tabs as seperator between short and long
filename.

But it's a silly job to generate reqmap by hand, so I wrote a little
perl script (genreqmap) which does this job for you. First you have
to edit some configuration details at the beginning of this file:

$fnet the path, where reqmap and noreq are stored
$reqmap the location of the reqmap file (same as in ifcico's config)
$noreq the location of a file which lists all filenames, that
should never be added to reqmap
$newreqmap temporary version of reqmap
$newnoreq temporary version of noreq
$reqmapadd new generated part of reqmap (preprocessed by this script)
$oldreqmap backup of last reqmap
$oldnoreq backup of last noreq
$pubdir the public directory (same as in ifcico's config)
!!! Note the tailing slash ('/') !!!
$files location of your filelist (plain uncompressed file)
$filesnew temporary version of filelist
$filesold backup of last filelist
$fileszip location of packed filelist
$fileshead location of the standard header of the filelist (name of
your BBS, phone numbers, name of sysop,...)
$filesbbs (not used at the moment)
$admin mail adress of the ifcico admin where the report should
be sent to.
$report tells what should be done with the generated report.
$zip packer to generate the compressed filelist (with options
to create a new archive)

After adjusting these entries to your needs you should generate
(empty) files $reqmap and $noreq. Then you should create a filelist
header $fileshead (maybe with CR LF at the end of the lines...).

Now you can run genreqmap the first time. This will scan your pubdir
recursively and generate a complete reqmap.add of all files. The
short form of the filenames is generated algorithmic (if you are
interested in the algorithm look at "sub translate" in genreqmap. The
generated list ist called reqmap.add, because I think that new entries
should be inserted into reqmap by hand. Now you can postprocess this
list by hand, e.g. you can copy the complete reqmap.add or parts of it
to reqmap. If you don't want that a file some/where/foo-bar.tar.gz
can be requested by the short name, don't add that line to reqmap and
insert the fullname (only the fullname, not the short one!) to noreq.
You can add new lines to reqmap and change the short names as you
like. After this you may want to run genreqmap again and it will find
new files in your pubdir, remove the entries of delted files, point
out possible duplicates and generate a new reqmap.add with all files
not in noreq or reqmap before.

Besides this functionality I added a feature to automaticaly generate
a filelist of all files in reqmap. The filelist will begin with the
above defined fileist header and every file is listed like this:

FOOBAR.TGZ 01.02.95 277K ~/some/path/foo-bar-1.2.3.tar.gz

This list isn't very readable (there should be some "file areas" with
a header and the file description is missing, too, but this is the
first release of the ifmaprequest package and in the next release
everything will be much better ;-)

genreqmap will generate a plain ascii filelist and a zipped version of
it. You should add a magic "FILES" (and a symbolic link "files" to
it, because magic seems to be case sensitive in ifcico) in your ifcico
magic directory which shows the location of your filelist (without
pubdir path) and FILES should not be executable.

I hope you will find this programm usefull.
Comments, extentions, bugreports etc. are extremely welcome, please
send them to Roland Rosenfeld <roland@spinnaker.rhein.de> 2:2450/42.

-- 
  * Internet: roland@spinnaker.rhein.de * Fido: 2:2450/42 *