Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formmail.pl works in web environment not on intranet

Status
Not open for further replies.

wr213

IS-IT--Management
Apr 2, 2002
24
US
I have a formmail.pl script that works on all of my websites but it will not work on a company intranet environment. When i click submit on the form that I am trying to send through it says:

The form attempting to use FormMail resides at which is not allowed to access this program.

If you are attempting to configure FormMail to run with this form, you need to add the following to @referers, explained in detail in the README file.

Add 'florida' to your @referers array.


-----------------------------------------------------

I removed the line from referrers that used to say:
@referers = qw(
and replaced with:

@referers = qw(florida);

and I also tried:

@referers = qw(localhost);


Still no luck. What line of code do I need to put on my script to make it work from within the intranet?

This might sound stupid, but not having access to CuteFTP or another FTP manager, how can I change the CHMOD on the script to 755? To gain access to the folder where all the files are, including the cgi-bin folder which I made nested in the main folder all I have to do is open an explorer window. I am used to right clicking on the file or folder and access the CHMOD setting where I change the permissions from 644 to 755.

Thanks in advance.
 
Your code is fine, it sounds like it is more likely a file access problem. Are you allowed to play arround with the settings on the company's server? If so what OS and Web Server software are you using? IIS has a FTP server which you can turn on, or alternatively download a FTP server from the web. You will then be able to ftp into your company's server using localhost as the ftp host name and change the CHMOD settings as normal. IIS also has a function to change access rights without the need for using a FTP server.

Rob Waite
 
I managed to accidentally find out how to CHMOD using a perl command if that's any use:
Code:
$count = chmod 0755, 'file1', 'file2';
this will set $count to 0,1,2 depending on how many files got changed. You can also use:
Code:
chmod 0755, @files;
@cannot = grep {not chmod 0755, $_} 'file1, 'file2', 'file3';
die "$0: could not chmod @cannot\n" if @cannot;
Hope that's of use, check for typos, I damaged my hand at rugby practise this evaneing and am strugglinh a bit!

Rob Waite
 
Thanks for replying. The issue I have is that the script I am using succesfully at a linux/unix based environment using apache (formmail.pl) is not working on the company intranet's IIS enviroment. I need to modify the formmail.pl script to work on a setting equal to sendmail which IIs doesn't support. I am not well verse in perl and there entails my problem. If I can get the same formmail.pl script modified for IIS I should be set. Any ideas would be greatly appreciated.

Thanks in advance.
 
FORMMAIL.PL is a perl script so you'll have to have perl installed and configured for IIS. Additionally, you'll have to find what Windows uses as an MAIL sending routine and modify the script accordingly. You may be able to install a Windows version of Mail or install an IIS compatible version of SMTP.

There's always a better way. The fun is trying to find it!
 
Have a look at Net::SMTP, you simply provide the name of the SMTP host, and build up your mail very straightforward


HTH
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ... smack the fecker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top