Home
 

Customer Support

Search for keywords:

Browse by category:

My formmail.pl script from Matt's Script Archive doesn't
work.

As of February 20, 2002 the formmail.pl at Matt's Script Archive has several vulnerabilities that allow it to be exploited by spammers. Also, many of the scripts at Matt's Script Archive are buggy and insecure.

Therefore, you should use replacement scripts from http://nms-cgi.sourceforge.net/ instead. The easiest script to use is the "compat" version. To use the script from NMS, just get the file from the NMS website, upload it to your /htdocs/www/cgi-bin/ directory, then get a shell prompt and type:
tar -xvzf htdocs/www/cgi-bin/[filename that you downloaded.tar.gz]
all on one line and then hit the ENTER key.

In the configuration section of the formmail.pl script you will need to set the correct path to to sendmail on our system, which is:

/usr/bin/sendmail


You will also need to fix the sendmail command parameters by deleting the '-oi' options from the command string.

Then, you will need to edit the configuration section of this script to put in your own values for @referers and @allow_mail_to and such, which are around line 48 of the script.

Finally, when installing this script on your site, it needs to be world executable in order to run. To make it world executable, issue these 2 commands from a shell prompt after you have uploaded formmail.pl into the /htdocs/www/cgi-bin directory:

cd

chmod 705 htdocs/www/cgi-bin/formmail.pl


If you don't know how to use a unix shell, your ftp software may have a graphical way for you to make the last permission bit "executable" but not "writeable" by "other".

For other problems with this form mail script, please make sure that you have set all the necessary variables in the script as described in the EXAMPLE and REDAME files that are contained in the script documentation. Also make sure that you have set all the necessary html form fields in the web page that POSTs to this script.

User-Contributed Notes

add a note
20-Dec-2002 14:32
Depending on what version of the formmail script you're using, you may
have to change:

     $mailprog          = '/usr/bin/sendmail'; 

to

     $mailprog          = '/usr/bin/sendmail -t';

in order to get it to work.

luding -at- ludingmeng.com
20-Oct-2003 18:29
my cgi formmail.pl not work Please give help. thanks.

30-Dec-2003 19:51
If you get script errors, make sure your path to sendmail is 

   /usr/bin/sendmail -t

and NOT what comes default with the script, and that you have put a
valid email address in the "recipient" form field of your HTML form and
also specified that exact same email address (with the @ symbol escaped
with a backslash like this: \@) in the "@recipients" configuration
section of the script OR have put your domain name in the @allow_mail_to
configuration section of the script.

03-Mar-2004 15:49
If you get an error about "closing sendmail pipe", then take out the
postmaster setting from the USER CONFIGURATION SECTION of the script by
putting a POUND sign "#" at the beginning of the line like this:

  $mailprog          = '/usr/bin/sendmail -t';
  # $postmaster        = '';
  @referers          = qw(yourdomain.com);


That is around line 45 of the script. You can either put a # sign in
front to comment out the line, or you can just delete that 1 line

add a note

Related Questions:


How do I use sendmail with perl?

How do I use cgi scripts?

Why does Sbox say "no such file or directory" but the files are there?

What Perl modules are installed?

Do you offer CGI? What scripts can I install?

I can't get the python socket module to work?

Why do I get: Sbox error file is world writable?

What is the path to perl or some other program?

Sendmail does not work or does not accept my optional arguments.

Importing the Python cgi module doesn't work.

How do I use MySQL with Python?

What version of Python do you support and what modules are available?

Why do I get: Sbox Error exec of [some script] failed (Exec format error)?

Why do I get: Sbox error file not world executable?

Why do I get: Sbox error the directory containing [some script] is world writable?

Why do I get: Sbox Error exec of [some script] failed (Permission denied)

Why do I get: Sbox error: cannot run suid scripts

Why do I get: Sbox Error exec of [some script] failed (Resource temporarily unavailable)

Browse Categories:

Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales


Tiny Modwest Logo         Copyright 2000-2008 by Modwest, Inc.          About Us    |    Blog    |    Jobs    |    Web Design    |    Contact Us