Search the Knowledgebase |
Browse by Category |
|
|
|
formmail.cgi Gives Me An Error (Bad/No Recipient) |
Article Details
Last Updated 28th of April, 2008
|
User Opinions (434 votes) |
26%
73%
|
Thank you for rating this answer.
|
This indicates that you are trying to send the email to an email address that is not located at your domain (ie something@aol.com). You have 2 choices to correct this problem:
1. Change the 'recipient' email address to an alias at your domain name (ie something@yourdomain.com which can be setup as an alias to another email account).
- or -
2. edit the script formmail.cgi and change the variable "@referers" to include the domain name you are trying to send the email to (ie aol.com). You can reference the script snippet below to find the "@referers" variable. If you are not comfortable editing a cgi script, email us and we can set the variable to its needed value for your script to work.
This new security measure has been installed to prevent outsiders from abusing the script to send unsolicited email (SPAM) through the formmail script.
#!/usr/bin/perl
##############################################################################
# FormMail Version 1.92sn #
# Copyright 1995-2002 Matt Wright mattw@scriptarchive.com #
# Created 06/09/95 Last Modified 09/10/02 #
# Matt's Script Archive, Inc.: http://www.scriptarchive.com/ #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 1995-2002 Matthew M. Wright All Rights Reserved. #
# #
# FormMail may be used and modified free of charge by anyone so long as this #
# copyright notice and the comments above remain intact. By using this #
# code you agree to indemnify Matthew M. Wright from any liability that #
# might arise from its use. #
# #
# Selling the code for this program without prior written consent is #
# expressly forbidden. In other words, please ask first before you try and #
# make money off of my program. #
# #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact. #
##############################################################################
# ACCESS CONTROL FIX: Peter D. Thompson Yezek #
# http://www.securityfocus.com/archive/1/62033 #
##############################################################################
# Define Variables #
# Detailed Information Found In README File. #
# $mailprog defines the location of your sendmail program on your unix #
# system. The flags -i and -t should be passed to sendmail in order to #
# have it ignore single dots on a line and to read message for recipients #
$mailprog = '/usr/lib/sendmail -i -t';
# @referers allows forms to be located only on servers which are defined #
# in this field. This security fix from the last version which allowed #
# anyone on any server to use your FormMail script on their web site. #
# HERE IS THE VARIABLE YOU WILL NEED TO EDIT #
@referers = ('www.yourdomain.com','yourdomain.com','something@aol.com');
# @recipients defines the e-mail addresses or domain names that e-mail can #
# be sent to. This must be filled in correctly to prevent SPAM and allow #
# valid addresses to receive e-mail. Read the documentation to find out how #
# this variable works!!! It is EXTREMELY IMPORTANT. #
@recipients = &fill_recipients(@referers);
|
Attachments |
No attachments were found.
|