################################################################## (C) 1999-2002 BigNoseBird.Com, Inc. This program is freeware and may be used at no cost to you (just leave this notice intact). Feel free to modify, hack, and play with this script. It is provided AS-IS with no warranty of any kind. We also cannot assume responsibility for either any programs provided here, or for any advice that is given since we have no control over what happens after our code or words leave this site. Always use prudent judgment in implementing any program- and always make a backup first! ################################################################## BNB'S NOMODOMO SUBSCRIPTION E-MAIL SYSTEM ----------------------------------------- Updated: 11-02-02 Now accepts four character TLDs such as .info and .name Updated: 02-03-02 Thanks to James Ryley, the scripts are not a bit more coherent and reliable. If updating from a prior version, please not that you no longer put trailing slashes on the $BASEDIR. The $delimiter variable is now supported in both the subscribe.cgi and the nmmdadmin.cgi scripts. Updated: 04-27-99 * Some people do not have access to SMTP, so the script will work with either SMTP or SENDMAIL. In the nmmdadmin.cgi, set either SMTP or SEND_MAIL, but NOT both! FEATURES -------- * Thank you page provides link back to calling page. * Mailing list file manager with pruning function. * Plenty of configuration error checking to prevent common errors. * Uses SOCKETS e-mail method for cross-platform compatibility. * Supports multiple mailing lists. * Form letter editor and manager. * Integrated mail send using SOCKETS for cross-platform compatibility. The BNB NOMODOMO consists of two scripts, subscribe.cgi and nmmdadmin.cgi. The purpose of the system is to provide a simple and flexible e-mail subscription system for any web site that does not have access to MajorDomo, or where MajorDomo is too much of a hassle to set up and maintain. The subscribe.cgi script is used to allow readers to either subscribe or unsubscribe from a mailing list. The mailing list name is specified in the calling HTML page, and by using the SELECT input tag, you can provide a choice of lists for your readers to subscribe to. (note: only using single item selections). The nmmdadmin.cgi script is an administrative interface. It allows you to maintain your mailing lists, create or edit form letters, and send out mailings. It is very flexible and simple to implement. ABOUT THE FILE FORMATS ---------------------- Mailing lists are stored in files that end with the extension "mbz". They are flat ASCII text files with pipe "|" characters used as field delimiters. You can modify the subscribe.cgi script to use a different character such as a TAB. Each subscriber record contains the person's email address, the IP address of the computer that submitted the requestion, and a date/time stamp. Form letters are stored in files that end with the extension "ltr". They are flat ASCII files. INSTALLING SUBSCRIBE.CGI ------------------------ STEP 1. Creating your subscribe/unsubscribe input form.
Subscribe Un-Subscribe
(provide HTML formatting as needed) *Be careful, the provided subscribe.html also contains an HTML screenshot of the admin screen! In the example above, you will see the form calls /cgi-bin/subscribe.cgi There is a radio button control to set the variable "action" to either subscribe or unsubscribe. If you only want to allow people to subscribe, replace the two radio buttons with a line like this: The datafile input can also be a SELECT control, allowing you to let a reader pick which mailing list to subscribe to. The email variable is what is placed in the "mbz" file for the reader's address. STEP 2. Editing subscribe.cgi Edit the subscribe.cgi file to meet your system's requirements. The only required change to the script is setting the $BASEDIR variable: $BASEDIR="/www/mydomain/cgi-bin/nomodomo/"; This must be set to the directory on your system where the letter and mail list files will be located. Be sure to set the permissions on this directory so that the script can write to it. (Either 775 or 777) Look at the script for other settings you might want to make. STEP 3. Installing subscribe.cgi Upload the subscribe.cgi file from your PC or Mac to the cgi-bin directory of your site using the ASCII method, not BINARY. *NOTE: DO NOT install the subscribe.cgi into the same directory as nmmdadmin.cgi. The reason for this will be covered in the next section. Using either telnet or your FTP client, set the permissions on the file to 755, which means owner can read/write/execute, group and others can read/execute. If you have done everything properly, you are now ready to start signing up your readers! If you do not wish to use the nmmdadmin.cgi script to maintain your files or send mail, you can download the gathered data for easy import into other e-mail systems. INSTALLING NMMDADMIN.CGI ------------------------ This is the master administration screen for the NOMODOMO system. You simply call it by entering a URL on the browser command line such as http://yourdomain.com/cgi-bin/directoryname/nmmdadmin.cgi STEP 1. Edit the nmmdadmin.cgi file. Edit the subscribe.cgi file to meet your system's requirements. $BASEDIR indicates the directory where your ltr and mbz files will be stored. Be sure that it is the same as you entered for subscribe.cgi $BASEDIR="/www/mydomain/cgi-bin/nomodomo/"; This must be set to the directory on your system where the letter and mail list files will be located. Be sure to set the permissions on this directory so that the script can write to it. (Either 775 or 777) $TEMPDIR is the location of the system temporary directory. setting below is fine for all unix systems. $TEMPDIR="/tmp"; $SCRIPT_URL is the URL (not path) of this script. $SCRIPT_URL="/cgi-bin/nodomo/nmmdadmin.cgi"; $SMTP_SERVER is the name of the sendmail or SMTP host that will send your mail. This script uses the SOCKETS method, and does not use sendmail or BLAT.EXE for cross-platform use and ease of installation. The value below should work on almost all systems that are capable of sending mail. Use your ISP's mail server such as mail.xxxyyyzzz.net if your host cannot originate mail. $SMTP_SERVER="localhost"; $DEFAULT_EMAIL is used as the default 'from' e-mail address for your mailings. You can type over this value when sending mail. $DEFAULT_EMAIL="yourname\@xxxyyyzzz.com"; Step 2. Installing smmdadmin.cgi Upload the subscribe.cgi file from your PC or Mac to the cgi-bin/nomodomo directory of your site using the ASCII method, not BINARY. Using either telnet or your FTP client, set the permissions on the file to 755, which means owner can read/write/execute, group and others can read/execute. *** IMPORTANT SECURITY INFORMATION *** The smmdadmin.cgi script contains NO INTERNAL SECURITY DEVICES!!!! To provide for restricted access, use .htaccess to password protect the directory containing the smmdadmin.cgi script. This is why you DO NOT INSTALL THE NMMDADMIN.CGI in your main /cgi-bin directory. Such a .htaccess file might look as follows: AuthUserFile /www/domain/passwords AuthGroupFile /dev/null AuthName "BNB NOMODOMO ADMIN" AuthType Basic require valid-user Although providing less security, you can do this if .htaccess is not available to you: 1.) Do not use the directory name nomodomo, pick something else. 2.) name the script something strange. 3.) when not using nmmdadmin.cgi, set its permissions to 644, owner can read/write, others and group can only read. RELEASE HISTORY --------------- subscribe.cgi V1.0 initial release on 04/17/99 nmmdadmin.cgi V1.0 initial release on 04/17/99