• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

qmail-inject not working for users?

D

devindull

Guest
We have a form mailer script and it originally was made to use sendmail, however since sendmail isn't a smart venture, we tried qmail-inject. The script is a working script, it's worked on many other servers with sendmail, although they haven't had Plesk installed.

After submitting the form (POST formmail.cgi) the server reponds saying:

Method Not Allowed
The requested method POST is not allowed for the URL /mailer/formmail.cgi.
--------------------------------------------------------------------------------
Apache/1.3.33 Server at www.tommywho.com Port 80

Here's the script we use:
#!/usr/bin/perl

$mailpath='/usr/local/psa/qmail/bin/qmail-inject*';
$address='[email protected]';

print "Location: http://www.tommywho.com/index.php\n\n";
print "Content-type:text/html\n\n";

if ($ENV{'REQUEST_METHOD'} eq 'POST'){
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
$input=$buffer;
$input=~ s/&/\n/g;
$input=~ tr/+/ /;
$input=~ s/%([\da-f]{1,2})/pack(C,hex($1))/eig;

open (MAIL, "|$mailpath -t")or die ("wrong mailprog\n");
print MAIL "To: $address\n";
print MAIL "From: LT Site Question\n";
print MAIL "Subject: Question from LT website\n";
print MAIL "$input\n";
print MAIL "\n\n";
print MAIL "HTTP-FROM: $ENV{'HTTP_FROM'}\n";
print MAIL "REMOTE-HOST: $ENV{'REMOTE_HOST'}\n";
print MAIL "FROM IP NUMBER: $ENV{'REMOTE_ADDR'}\n";
close (MAIL);
}


Any ideas? Please help us.
 
Back
Top