How to get the script
You will find Matt's FormMail script available for downloading at:http://worldwidemart.com/scripts/
Unzip the file Formmail.zip and you'll find two files
formmail.pl - the script file itself and a readme file which you should read carefully.
You will see that you need to know where your server's sendmail program is. You can find
this by using Telnet to login to your server and typing:
which sendmail
This should tell you where sendmail is on your server. The
script is set up for it to be in the /usr/lib directory so if it's in a different location
you'll need to alter the script file.
If you can't find sendmail on your server this way then speak
to your Webmaster. We couldn't find it on our server using the 'which sendmail' command
even though it was there but our Webmaster was able to tell us where it was when emailed
with our request.
You will also need to know where your Perl interpreter is on
the server. It is most likely to be in the directory /usr/bin/perl (which is the default
in the script file) but you should check when you are connected to your server using your
Telnet program by typing:
which perl
and write down the directory if it differs from the default.
Now, armed with the knowledge of where sendmail and your Perl
interpreter are on your server, open formmail.pl in NotePad or another text editor that
will save files as plain text. The first line of the script is the location of your perl
interpreter. It currently reads #!/usr/bin/perl, and you should alter this if needed so it
points to the directory that the Perl interpreter is located in on your server. About a
half page further down is the line: $mailprog = '/usr/lib/sendmail'; which is the location
of sendmail, again, alter this if necessary.
Edit the line:
@referers =
('www.worldwidemart.com','worldwidemart.com','206.31.72.203');
replacing the IPs with the IPs of your server.
You can now save file formmail.pl as a text file and upload
it using FTP to your cgi-bin directory which should be located off your personal directory
on the server. If you don't have a cgi-bin directory, then create one first.
Now you need to alter the permissions for the file, so Telnet
into your server and execute the command:
cd cgi-bin
to change directory to your cgi-bin directory.
Now type:
chmod 755 formmail.pl
This is necessary to allow anyone to read and execute the
script file and to allow you to write to it. CHMOD is short for CHange access MODe and is
similar to the ATTRIB command in DOS.
You can now exit your telnet session.
|