Error: RCPT TO: error (550 relay not permitted)
am 11.02.2006 19:39:08 von FJRussonc
Copied the below code straight from a web source (
http://alma.ch/perl/Mail-Sendmail-FAQ.html#HTML ) on sending html emails w/
PERL. The ONLY change I made was to put GOOD email addresses in the TO /
From
I am getting the following errror and need help?
---------Error: RCPT TO: error (550 relay not permitted) -------------
=======================================
use MIME::QuotedPrint;
use HTML::Entities;
use Mail::Sendmail 0.75; # doesn't work with v. 0.74!
$boundary = "====" . time() . "====";
$text = "HTML mail demo\n\n"
. "This is the message text\n"
. "Voilà du texte qui sera encodé\n";
%mail = (
from => 'me@annunciationparish.org (webmaster)',
to => 'my@yahoo.com (Frank)',
subject => 'Test HTML mail',
'content-type' => "multipart/alternative; boundary=\"$boundary\""
);
$plain = encode_qp $text;
$html = encode_entities($text);
$html =~ s/\n\n/\n\n
/g;
$html =~ s/\n/
\n/g;
$html = "
" . $html . "
";
$boundary = '--'.$boundary;
$mail{body} = <
$boundary
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
$plain
$boundary
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
$html
$boundary--
END_OF_BODY
sendmail(%mail) || print "Error: $Mail::Sendmail::error\n";
============================================
Re: Error: RCPT TO: error (550 relay not permitted)
am 12.02.2006 00:43:56 von unknown
Frank J. Russo wrote:
> Copied the below code straight from a web source (
> http://alma.ch/perl/Mail-Sendmail-FAQ.html#HTML ) on sending html emails w/
> PERL. The ONLY change I made was to put GOOD email addresses in the TO /
> From
>
> I am getting the following errror and need help?
>
> ---------Error: RCPT TO: error (550 relay not permitted) -------------
>
> =======================================
> use MIME::QuotedPrint;
> use HTML::Entities;
> use Mail::Sendmail 0.75; # doesn't work with v. 0.74!
>
> $boundary = "====" . time() . "====";
>
> $text = "HTML mail demo\n\n"
> . "This is the message text\n"
> . "Voilà du texte qui sera encodé\n";
>
> %mail = (
> from => 'me@annunciationparish.org (webmaster)',
> to => 'my@yahoo.com (Frank)',
> subject => 'Test HTML mail',
> 'content-type' => "multipart/alternative; boundary=\"$boundary\""
> );
>
> $plain = encode_qp $text;
>
> $html = encode_entities($text);
> $html =~ s/\n\n/\n\n
/g;
> $html =~ s/\n/
\n/g;
> $html = "
" . $html . "
";
>
> $boundary = '--'.$boundary;
>
> $mail{body} = <
> $boundary
> Content-Type: text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> $plain
>
> $boundary
> Content-Type: text/html; charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> $html
> $boundary--
> END_OF_BODY
>
> sendmail(%mail) || print "Error: $Mail::Sendmail::error\n";
>
> ============================================
>
>
Your SMTP server is not configured to relay mail. Contact the
administrator of that server, or use another server.
Tom Wyant
Re: Error: RCPT TO: error (550 relay not permitted)
am 12.02.2006 00:55:16 von Jake Peavy
Frank J. Russo wrote:
> ---------Error: RCPT TO: error (550 relay not permitted) -------------
RFC 2505 Anti-Spam Recommendations February 1999
In an SMTP session we have 4 elements, each with a varying degree of
trust:
1) "HELO Hostname" Easily and often forged.
2) "MAIL From:" Easily and often forged.
3) "RCPT To:" Correct, or at least intended.
4) SMTP_Caller (host) IP.src addr OK, FQDN may be OK.
Since 1) and 2) are so easily and often forged, we cannot depend on
them at all to authorize usage of our host as Mail Relay.
Instead, the MTA MUST be able to authorize Mail Relay usage based on
a combination of:
o "RCPT To:" address (domain).
o SMTP_Caller FQDN hostname.
o SMTP_Caller IP address.
The suggested algorithm is:
a) If "RCPT To:" is one of "our" domains, local or a domain that
we accept to forward to (alternate MX), then accept to Relay.
b) If SMTP_Caller is authorized, either its IP.src or its FQDN
(depending on if you trust the DNS), then accept to Relay.
c) Else refuse to Relay.
-jp