Electric Postcard Office Operating Manual

Setting up your Post Office


To set up your own prefab Postcard Office just take the following easy steps: Once you have completed these steps, your Postcard Office should be fully operational.

Before we begin

You should be familiar with how the Postcard Office works. You need to have an http server running. And you need to have Perl 5.0 (or later).

Retrieve the Source

First, download the
source files. Use tar to decode it.

e.g.: tar xf EPO_2.0.tar


Put the directories in place

The distribution consists several directories. Underneath this are 5 subdirectories:
The POScripts directory can be moved without needing to re-edit the body of the html files. For instance, you may wish to move all the scripts to your cgi-bin directory.

The other 4 subdirectories should be kept as subdirectories of the top level Postcard directory. You can put this directory anywhere that is accessible to your server.


Make the storage subdirectories

Under the directory you've chosen for storage (specified by $HoldingDir) you will make a tree of subdirectories for storing the users' messages. You choose how many subdirectories there are by setting the $DirLevels variable (between 1 and 9). You will have 10^$DirLevels directories (i.e. if $DirLevels is 1, there will be 10 subdirectories; if it is 2, there will be 100) so don't pick too high a number. The default is 3 (1000 subdirectories). If you find that the number of cards in each directory is getting too high, you will want to add another directory level.

Each directory level has 10 subdirectories, named 0 1 2 3 4 5 6 7 8 and 9. Each of these has 10 subdirectories, named 0 1 2 3 4 5 6 7 8 and 9 and so son. Here is a utility for making these subdirectories. It must be run as root in order to change ownership of the directories.


Configure your server

Most http servers translate the pathnames of files. Thus, the URL

http://www.somewhere.org/Postcards/Welcome.html

does not really refer to a file at the top level of the directory of the machine www.somewhere.org. Rather, /Postcards is a translated location. The actual path of that file may be, say,

/usr/postcardmistress/home/CardShoppe/Welcome.html .

This translation is done by configuring your server. Depending on where you put the top level Postcard directory and the scripts you may need to reconfigure your server.

The scripts must be in a directory that your server recognizes as a script directory. For instance, if you put the scripts in

/usr/webthings/CGI-scripts/PostOfficeScripts

your server must be configured to run scripts in that directory; and, you will probably want to configure your server to translate calls to /PostcardBin (or /POscripts or whatever you want to call it) to that directory. Similarly, you will probably want to make a translation for the top level Postcard directory.

What if I don't want to reconfigure my server?

As long as you have access to a directory that has been configured to be an executable script directory and a directory that can server html you are fine. Put the files from the POScripts directory in your executable script directory. Make the top level postcard directory a subdirectory of your regular html directory.

Modify POvars.perl

In the POScripts directory is a file called POvars.perl. This is your Post Office configuration file. We suggest that you make a safe copy of this file before you edit it.

The default values are for a setup where:

The comments should make this file self-explanatory, no?

 
##################################################################
# The contents of POvars.perl
#
# Hostname $HostName = 'www.institute.edu';

#	Welcome page: with URL translation
$POwelcome = '/Postcards/';

#	Post office icon: with URL translation
$POicon = '/Postcards/PostCardPix/POButton.gif';

#	The actual (non-translated) path of the script directory
$POscripts = '/usr/cardmaster/CGI-bin/PO-Bin';

#	The URL-translated (config)path of the script directory
$PObin = '/PO-bin';

# 	Directory above the postcard directory
$TopDir = '/usr/cardmaster';

# 	Directory holding the users' postcard files (actual path)
$HoldingDir = '/usr/cardmaster/EPostcards_1.1/Storage';

#	Number of levels in the holding directory: must between between 1 and 9
$DirLevels = 3;

# 	Directory holding the card database
$DatabaseDir = '/usr/cardmaster/EPostcards_1.1/Database';

#	Log of cards claimed  (actual path)
$LogFile = '/usr/cardmaster/EPostcards_1.1/log';

#	File to display for non-existent card  (actual path)
$NoSuchCard = '/usr/cardmaster/EPostcards_1.1/NoSuchCard.html';

#       Initial delete time in seconds:  60 * 60 * 24 * ndays (here 14)
$deleteInterval = 1209600;

#       The "Cardmaster"
$cardmaster = 'webmaster@www.institute.edu';

#	Other questions to:
$contact = 'you@www.institute.edu';

Return to Electric Postcard Operations:
Introduction

Last modified: Tue Dec 29 11:04:51 Eastern Standard Time 1998