Configuring the LWGate

Line Image

Now that the LWGate source is available on your HTTP server, you need to edit the source and configure certain options which are specific to your site. All of these options are placed at the top of the script, and this page will guide you through each modification you may need to make.

Modifications to the Script

1. - Specify the Perl interpretter

The first line of the script specifies the full path to the Perl interpretter. By default, this line is:

#!/usr/bin/perl

If Perl is available from a different directory, you will need to change this line.

2. - Configure the mailer

The $MAILER variable stores the invocation of the command to send mail on the HTTP server. This will be used to send commands to the mailing list server. The script is distributed with a value of:

$MAILER = "/usr/sbin/sendmail -t -f$temp";

This basically tells the script to execute the sendmail program in the /usr/sbin/ directory with the command line options of -t -f followed by the email address of the person using the script ($temp is the user's email address after the script escapes any shell metacharacters). Depending on y our server, you may need to modify the path or even the command itself. More info about this command invocation is available from the sendmail man page.

NB: I believe that by default, ListProcessor 6 servers do not use the "From:" header field to determine where the mail came from, but rather uses the "From " address. To make the LWGate usable for ListProcessor servers, one solut ion would be to make sure that all servers used by the LWGate are configured to instead use the "From:" header; a script is available in the 6.0c distribution to accomplish this. The alternative is to have your mailer set the "From " address to the value of the "From:" field. This is what the "-f$temp" option to sendmail is attempting to accomplish.

However, in order to use this option, sendmail may need to consider the HTTP daemon a "trusted" user. Again, see the sendmail man page, however I believe that this is necessary only for versions of sendmail earlier than 6.x. For these early relea ses of sendmail, if http_user is the userid under which the LWGate script will be executed, the following line should be added to your sendmail.cf:

Thttp_user

This should add that userid to sendmail's trusted user list. Do not consider these directions as a reliable source, but just as a few pointers when looking for such a source. Check your sendmail man page for more info.

3. - Define the Supported LISTSERV(TM) Server

The $LSERV_SERVER variable stores the email address of this site's supported LISTSERV(TM) mailing list server. This server will be used for LISTS commands, which searches LISTSERV(TM) for available mailing lists, and will be used to request LISTS ERV(TM) documentation. Note that the LISTS command for LISTSERV(TM) supports global searching of all available servers worldwide. The format of the email address is generally "LISTSERV@host.domain". Leave this variable blank if your si te does not support a LISTSERV(TM) server and does not wish to make this functionality available. Realize that this does not prevent your script from supporting individual lists which use their own LISTSERV(TM) servers.

4. - Define the Supported ListProcessor Server

Similar to the previous variable, the $LPROC_SERVER variable stores the email address of this site's supported ListProcessor server, generally of the format "listproc@host.domain". Note that the ListProcessor version of the LISTS com mand only searches to local server, so you probably want to leave this variable blank if your site is not responsible for a ListProcessor server. Again, leaving the variable blank does not prevent your script from supporting mailing lists which use their own ListProcessor servers.

5. - Define the Supported Majordomo Server

The $MDOMO_SERVER variable is the email address of the supported Majordomo server, generally "majordomo@host.domain". Just like ListProcessor, the Majordomo version of the LISTS command only searches the local server, and thus you wi ll probably want to leave this variable blank if your site is not responsible for a Majordomo server. This doesn't prevent your script from supporting lists run by a Majordomo server.

6. - Define the Supported SmartList Server

The $SLIST_SERVER variable is the email address of the supported SmartList server. SmartList doesn't support a LISTS-like command, so this address is used only to obtain the SmartList help file.

7. - Indicate the URL to This Script

The $SCRIPT_URL variable should be set to the absolute URL of this script. (e.g. "http://host.domain/cgi-bin/lwgate")

8. - Indicate the URL of the Page About This LWGate

The LWGate allows you to create a WWW page describing any site specific information about this LWGate. A link to this page is made from the LWGate script's home page. Place the URL to this page in the $SERVER_INFO_URL variable. If you leave this variable blank, the script will not present such a link.

9. - Indicate the E-mail Address of the Script Administrator

The email address of the person responsible for maintaining this script should be placed in the $ADMIN_MAIL variable.

10. - Indicate the Name of the Script Administrator

The name of the person responsible for maintaining this script should be placed in the $ADMIN_NAME variable.

11. - Define the Database File

The $DBASE_FILE variable should be set to the full path and file name of the database for this script. The database file is a comma-delimited file which contains essential information about each list which this script supports, and the next major step in installing the LWGate is to create the LWGate database. This database can be in any directory on the server which will be readable by the script when executed by the HTTP server. (One possible location could be "/usr/local/lib/lwgate-dbase".)

12. - Set the Server Name

The $SERVER_NAME allows you to define a name identifying the server on which this instance of the script is running, and often times is merely the host name. By default it is blank.

13. - Indicate the URL to the Logo Graphic

The $LOGO_URL variable should be set to the absolute URL of the LWGate logo, as installed when the source distribution was obtained. If you leave this variable blank, the script will not include the logo in its pages.

14. - Indicate the URL to the Button Graphic

The $BUTTON_URL variable should be set to the absolute URL of the LWGate button icon. If left blank, the script won't include this graphic in its pages.

15. - Turn On/Off Offer's to Add to This Script's Database

The $OFFER_ADDS variable should be set to either 0 or 1. If set to 1, the script will mention the form used to file requests to have a mailing list added to this script's database. If set to 0, the script will not advertise this feature, but the form will still be available by specifying the proper URL (e.g. "http://host.domain/cgi-bin/lwgate/request-add.html"). If you do not wish to honor requests for additions to the script, set this variable to 0. By default, it is set to 1 .

16. - Turn On/Off HyperText Archive Symbolic Links

The LWGate can present a hypertext interface to archives available on your server. The $SYMLINKS variable defines whether or not the script should follow any symbolic links in the archive directories. When set to 1, the script will follow and pre sent files and directories which are symbolic links. When set to 0, the script will not follow or present them. By default, this variable is set to 0, and changing it to 1 may have some security implications, depending on your server configuration.

16. - Enable/Configure Decompression of Archives

The $DECOMP variable stores the command to use to decompress .Z, .gz, and .z compressed archives. The LWGate uses this command to decompress any compressed archive which is made available for a list (see creat ing the LWGate database) which then pipes the decompressed archive to standard output. By default it is "/bin/zcat". Make this variable blank if you do not wish to decompress compressed archives.

The final step in setting up the LWGate on your server is to create an LWGate database.

Line Image

Copyright 1996, David W. Baker.