Installing mlm-command

This document assumes that you have a Unix shell account with your Web hosting provider (probably your ISP), and that you have the ability to install and run CGI scripts in your own Web space. If you're not sure if this is the case, contact your ISP or Web hosting provider, or consult their member support Web pages.

If you aren't allowed to run your own CGI scripts, your only recourse would be to contact your ISP or Web hosting provider and ask them to install mlm-command for use by their customers (or just by you, which may be an easier thing to convince them of).

This also assumes you have an FTP program and know how to use it, and that you can make a few basic edits to a file in a Unix editing program.

First, you'll need to know a few things about your Web hosting setup. The answers to these questions can usually be found on your Web hosting provider's member support pages; if not, you should call tech support and ask them.

Is there a special directory where CGI scripts have to reside? If so, it's probably called cgi-bin (for CGI (Common Gateway Interface) BINaries). For now, we'll refer to it as [cgi-bin directory].

Alternatively, it's possible that you can have CGI scripts anywhere in your Web directories. In that case, they probably need to have a special extension in order to work (usually .cgi; possibly .pl for Perl scripts). Without this extension, the Web server software will try to display the contents of mlm-command instead of executing it as a script.

If you can place your CGI scripts anywhere, then you should select a particular location for mlm-command -- in your Web root (or document root) directory will probably turn out to be most convenient. For now, we'll call this [mlm-command destination directory].

If you intend to use any of the pre-supplied display files, you'll want a specific location for them -- it's more convenient if they're all in one directory of their own. Probably the best option is a display-files directory in your Web root (or document root) directory, so the DisplayFiles variable can be set to "/display-files/generic", "/display-files/punk", or whatever. Whatever location you pick, the important thing to remember is the parent directory of that location; we'll call that [display-files parent] for now.

You'll also need to find out what command your server uses to send mail. It's probably some version of Sendmail, so the command "which sendmail" will give you the exact location. mlm-command defaults to /usr/bin/sendmail, but there's a lot of variation. If you have trouble locating it, ask your system administrator or your ISP's tech support person.

Finally, you should check the location of the Perl interpreter on your system, by typing "which perl" in your Unix shell. On many systems, it's /usr/bin/perl, and that's what mlm-command assumes. However, some systems place it somewhere else, so you may have to edit the first line of the mlm-command script to make it work properly. We'll call that [Perl location].

Once you've determined [Perl location], [display-files parent], and either [cgi-bin directory] or [mlm-command destination directory] (whichever is appropriate), you should start by downloading the full installation package. Then, upload it directly, as is, to your Web host, using your FTP program as if you were uploading any other file for your Web site. Once it's uploaded, log in to your Unix shell account, and perform the following steps.

Note: If you get tired of typing long directory and file names, check to see if your shell is a modern one with command-line completion. For the first command, try typing "tar -xvzf mlm<Tab>" -- if you use either the bash or tcsh shells, "mlm-command-0.50.0.tar.gz" should be filled in automatically for you.

If You Have a Pre-Set [cgi-bin directory]:

  1. Unpack the installation file:
    tar -xvzf mlm-command-0.50.0.tar.gz
    (You should see a list of files scroll down the screen.)
  2. Copy the mlm-command script itself to your cgi-bin directory:
    cp mlm-command-0.50.0/mlm-command [cgi-bin directory]
  3. Make sure mlm-command is executable:
    chmod +x [cgi-bin directory]/mlm-command
  4. Copy the display-files directory (and all contents) to its final location:
    cp -a mlm-command-0.50.0/pages [display-files parent]

If You Can Put CGI Scripts Anywhere:

  1. Unpack the installation file:
    tar -xvzf mlm-command-0.50.0.tar.gz
    (You should see a list of files scroll down the screen.)
  2. Copy the mlm-command script itself to whatever location you desire, and simultaneously add a ".cgi" extension:
    cp mlm-command-0.50.0/mlm-command [mlm-command destination directory]/mlm-command.cgi
  3. Make sure mlm-command is executable:
    chmod +x [mlm-command destination directory]/mlm-command.cgi
  4. Copy the display-files directory (and all contents) to its final location:
    cp -a mlm-command-0.50.0/pages [display-files parent]

Finally, in either case, you may need to edit mlm-command to tell it the proper locations of Perl and Sendmail (or some other mailer) on your system. The location of Perl should be in the first line of the program (starting with the characters #!). The location of Sendmail should be in the $MailProg variable, anywhere from 55 to 65 lines into the program. You should make sure that the line with the correct location does not have a # character at the front of it, and that all other lines with "$MailProg" in them either do start with #, or simply delete them. This will require a Unix editor, such as vi, emacs, or pico. Providing assistance with these editors is outside the scope of this documentation.

If all else fails, you can use your FTP program to download the mlm-command file to your computer. Open it in your favorite HTML editor, which should be able to convert Unix newlines to your preferred operating system's format. Edit the first line, and set the $MailProg variable, then save the file and re-upload it.

To test that mlm-command still runs after performing this operation, type "./mlm-command" into the Unix command line and press Enter. (The initial period and slash are important.) If you see an error message stating that "No request method was specified", then it works properly.

You should now have a working mlm-command installation on your system. You can easily test this by pointing your browser at the mlm-command executable, with no arguments. For example, if you have a set cgi-bin directory, you'll probably want something like http://[your host name]/[your login name]/cgi-bin/mlm-command. If you can put CGI scripts anywhere, it should now be in http://[your host name]/[your login name]/mlm-command.cgi.

Either way, if you go to the proper URL, you should see a page saying "Error: No Email Address!" If you add "?" to the end of the URL, the page should change to one that says "Error: No List Specified!"

You can now start setting up HTML forms to use mlm-command, using the full variety of features described in the mlm-command command reference.

You may also want to send an email to, letting him know that you've successfully installed mlm-command on your Web hosting provider's system.

Home  |  Command Reference  |  DisplayFile Tokens  |  Sysadmin Docs