adduser.pl Installation Instructions
====================================

$Id: INSTALL,v 0.1 2003/12/15 21:27:30 acorliss Exp acorliss $

  Installation of the this script is (hopefully) straight-forward, but there
are some manual steps that must be taken to prep the system.


I. Prepping the mail system
---------------------------

  This script automatically adds an entry into the virtusertable for every
account.  This is done on my systems since I use virtusertable to restrict
accounts to specific domains.  For instance, if I was hosting two domains on
the mail server, 'foo.com' and 'bar.com', not maintaining virtusertable means
that when I created an account for 'joe', who belongs to 'foo.com', he could
send and recieve mail as 'joe@bar.com' if he wanted to.
  I may not be able to stop 'joe' from forging his sender address, but I can
certainly stop him from recieving mail at those forged addresses:

joe@foo.com          joe
jim@foo.com          jim
@foo.com             error:nouser  No account by that name

sue@bar.com          sue
harry@bar.com        harry
@bar.com             error:nouser  No account by that name

Accounts set up in virtusertable as such effectively restrict each account to
recieving mail only at the authorised domains.
  The adduser.pl attempts to keep each domain's addresses together to keep it
simple to maintain.  It does this by looking for a comment in the text file,
before which it will insert the new address:

webmaster@foo.com    joe
joe@foo.com          joe
jim@foo.com          jim
# end foo.com
@foo.com             error:nouser  No account by that name

When 'john' opens an account with this script his address will be added right
before the '# end {domain}' comment.  This tag *must* be exact -- no leading
spaces, multiple spaces, etc.
  Once the alias is added to virtusertable, the database must be rebuilt.
Since there's many formats that it could be built with, this script assumes
that there is a Makefile in /etc/mail which accepts a target of 'all' that
will build the virtusertable database.  A sample Makefile (Makefile.etc-mail) 
is included as a sample, but you will want to verify the commands and data
formats in it, as well as the target files.

II. Prepping the disk quota system (optional)
---------------------------------------------

  This script assumes BSD quota commands (edquota, specifically).  If you are
using quotas you'll need to set up a prototype system account with the disk
quota manually set to the default levels that will be applied to all new
accounts.  You will use this account in your conf script as the QUOTAP user.

III. Installing the adduser.pl script
--------------------------------------

  With the above finished, all that's left is to install the adduser.pl
script.  Use the following commands, answering any questions the script may
have:

  perl Makefile.PL

IV. Post installation
---------------------

  The only things that remain are the installation of the actual signup form (a
sample signup.html is provided), the error/success templates, and the script
configuration file.  All of which have sample files included with this
package.
  The error.ttk and success.ttk files are expected to be found in the
{script-location}/../lib/ directory.  The adduser.conf file should be placed
where you told the installation script it would be.

Notes:  Please remember to leave QUOTAP undefined if you do not intend to use
a disk quota system.  HTTP_REFERER must be the correct URL to the sign-up form
you use.
