Guest Book
From Campus Web Server Help
To create a GuestBook on www.uga.edu, you do not need any special privileges. However, you will need to create some files that will reside in your "home" directory and your "public_html" directory. The former is the initial directory that you log into and the latter is the directory where you store your HTML documents.
Please keep in mind that before you undertake the steps below, you are responsible for the contents and maintenance of the GuestBook.
Step By Step Guide
- Remove or rename the .forward file in your home directory, if it exists. The .forward will forward your mail to the e-mail address specified in the file. This file cannot exist; you must do away with it if you wish to use GuestBook. If you are using the .forward file to forward mail to another address, don't worry. You can take care of that in the .procmailrc file you will create in the next step.
- Create a .procmailrc file in your login directory. The .procmailrc looks like this:
UMASK=022
:0
* Subject: SUBJECT_OF_MAIL_THAT_WILL_BE_SENT_TO_GUESTBOOK_FILE
| formail -I "Received" \
-I "To" \
-I "Date" \
-I "From" \
-I "Message-Id" \
-I "Subject" \
-I "Return-Path" \
>> public_html/PATH_TO_AND_NAME_OF_GUESTBOOK_FILE
:0
*
! EMAIL_ADDRESS_TO_FORWARD_OTHER_MAIL_TO
There are two stanzas (or "rules") here that determine how mail sent to your account will be handled. Each starts with ":0". In the first stanza, change:
SUBJECT_OF_MAIL_THAT_WILL_BE_SENT_TO_GUESTBOOK_FILE
to a special subject for mail sent to your account on WWW. This subject should be somewhat obscure. Something like this should be sufficiently obscure:
:--GBforUS--:
Replace US with some string of characters that identifies your GuestBook. Keep in mind, however, that nobody really sees this subject. It will be used by the form you create in the next step. Also in the first stanza, change:
PATH_TO_AND_NAME_OF_GUESTBOOK_FILE
This is the file that will be created for you. It will contain all mail sent to your WWW account with the subject for your GuestBook. You can pre-create this file if you wish, adding some preceding information to the entries added to the GuestBook. The GuestBook file must reside within your "public_html" directory or a directory within your "public_html" directory. To forward all mail not included in the GuestBook file to another address, in the second stanza change:
E-MAIL_ADDRESS_TO_FORWARD_OTHER_MAIL_TO
to a valid e-mail address.
- Create a form. This self-documenting GuestBook form is your guide. After filling out the form and submitting it to see how everything fits together, follow the directions contained within this form to create your own GuestBook form.
* Pre-Create (Optionally) the GuestBook File.
You can create a GuestBook file to place information before the GuestBook entries.
- Create a link to the GuestBook form. After you have created and tested your GuestBook and are satisfied with the way it functions, create a link on any of your pages to the form. For example, if you created a directory called "guestbook" in your public_html directory, and called your form "guestbook-form.html", you could refer to the form on your home page with the URL:
<a href="guestbook/guestbook-form.html"> Sign Our GuestBook</a>
Summary of Files and Details for the Curious
- In your login directory:
- .procmailrc --- You create this file. It tells a program called procmail what to do with the incoming mail.\
- In your public_html directory:
- An HTML Form for Your GuestBook - You call it what you want and you put it where you want it, within the public_html directory.
- A File Containing GuestBook Entries - You specify this in the ".procmailrc" file. It will be created for you or you can create it yourself.
