Web Hosting Talk







View Full Version : Problem with FormMail


jfiliss
06-11-2002, 08:44 AM
I'm not getting any mail with the FormMail set up on my server (Ensim Webppliance 3.0) and this is true for all the sites that utilize it. The formmail doesn't show an error message or anything, and I have what I believe is the correct sendmail path

/usr/sbin/sendmail

but I'm not getting any email. I tried reinstalling it on one of the sites, but to no avail. I'm really at my wit's end here. Does anyone have any input?

Thank you. :)

v-rod
06-11-2002, 09:01 AM
Try: /usr/lib/sendmail

priyadi
06-11-2002, 09:56 AM
Did you see anything in the error log?

jfiliss
06-11-2002, 04:27 PM
I only saw one error in the error log that might pertain to it:

Premature end of script headers: /home/virtual/site8/fst/var/www/cgi-bin/formmail.pl



I tried

/usr/lib/sendmail

to no avail.

MGCJerry
06-11-2002, 05:24 PM
Could it be possible that the server admin disabled scripts with that name from running??? I dont know a lot about ensim, but this is something that would come to my mind.

Try renaming the script to something else completely and see if it runs... When I used to use formmail.cgi I renamed it to "processor.pl" which made it look like it had a different function to any spammer who was looking for a formmail to hit.

I think I remember Aleita (spelling?) posting on their forum stating that any script named formmail or mailform would not run.

Just my 2 cents

priyadi
06-11-2002, 06:09 PM
"Premature end of script headers" means your formmail probably couldn't be executed by the web server, try executing your formmail on the command line.

Possible reasons:
- you forgot to chmod +x the formmail
- it wasn't uploaded in ascii mode
- wrong path to perl interpreter
- suexec permission check failed, check the suexec logs for more info

jfiliss
06-11-2002, 07:02 PM
MGCJerry, I'll try your suggestion, but I am the server admin, so I don't think that would be the issue.

I definitely chmodded the script (755) and uploaded ASCII. The rest is honestly a little opaque to me. I don't know what the proper path to the Perl interpreter would be (I could probably get tech support on that), or anything about suexec logs. Where would they be?

I run a very vanilla box...the one single thing I added was formmail.

elsmore1
06-11-2002, 07:27 PM
on a RH box, the suexec_log is often found in /var/log/httpd

In addittion to having the script chmod to 755 or less, make sure the directory is not world writeable.

at the command promt do a "whereis perl" (without the quotes) to get the path to perl (often /usr/bin/perl or /usr/local/bin/perl)

Originally posted by jfiliss
MGCJerry, I'll try your suggestion, but I am the server admin, so I don't think that would be the issue.

I definitely chmodded the script (755) and uploaded ASCII. The rest is honestly a little opaque to me. I don't know what the proper path to the Perl interpreter would be (I could probably get tech support on that), or anything about suexec logs. Where would they be?

I run a very vanilla box...the one single thing I added was formmail.

jfiliss
06-12-2002, 05:47 PM
Every line in the suexec_log is basically identical to this:

info: (target/actual) uid: (admin5/admin5) gid: (admin5/admin5) cmd: formmail.pl

jfiliss
06-12-2002, 05:50 PM
One thing that may be unrelated is my partner on the box uses Frontpage, and he is unable to set up the same type of form with Frontpage extensions. I watched him set one up seamlessly on another server, and then try it on our server only to get an error.

elsmore1
06-12-2002, 07:09 PM
suexec_log looks good. It' may well be a problem with the call to sendmail still or something else yet. The premature end of script headers just means that the script tried to execute, but either crashed or was halted (or tried to print something besides the expected headers) before the webserver got the headers it was looking for. It CAN be tricky to find sometimes, but usually is something simple.

(sent you a PM)

xerocity.com
06-12-2002, 08:09 PM
jfiliss,

You stated your the server admin; after you have typed whereis perl at the command prompt. It will then tell you where perl is located if it matches what you have on the first line of the script, "chmod 777 formail.pl" while logged in as the root to see if it will then work. Did you upload it to your cgi-bin? This may be the only location cgi works on your server.

Try changing the extention from .pl to .cgi or vice versas maybe your server is only configured for one of these extensions.

make sure that there is a line in the script that states -- print "Content-type: text/html\n\n";

exactly like shown.

p.s. if you chmod 777 it as root, it will override any security settings and should allow it to execute.

elsmore1
06-12-2002, 09:04 PM
I don't believe that suexec likes scripts that are world-writable. 755 would be a better chmod (and all that is necessary, as that gives everybody read/execute permissions. You shouldn't need write permission to execute a script.)

priyadi
06-12-2002, 10:24 PM
Have you tried executing the formmail from command line?