• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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