Click here to get back home

Error: RCPT TO: error (550 relay not permitted)

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Error: RCPT TO: error (550 relay not permitted) Frank J. Russo 02-11-2006
Get Chitika Premium
Posted by Frank J. Russo on February 11, 2006, 1:39 pm
Please log in for more thread options


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<p>/g;
$html =~ s/\n/<br>\n/g;
$html = "<p><strong>" . $html . "</strong></p>";

$boundary = '--'.$boundary;

$mail = <<END_OF_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>$html</html>
$boundary--
END_OF_BODY

sendmail(%mail) || print "Error: $Mail::Sendmail::error\n";

============================================



Posted by harryfmudd [AT] comcast [DOT] on February 11, 2006, 6:43 pm
Please log in for more thread options


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<p>/g;
> $html =~ s/\n/<br>\n/g;
> $html = "<p><strong>" . $html . "</strong></p>";
>
> $boundary = '--'.$boundary;
>
> $mail = <<END_OF_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>$html</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

Posted by DJ Stunks on February 11, 2006, 6:55 pm
Please log in for more thread options


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


Similar ThreadsPosted
GD.c: 533: error: syntax error before "void" March 24, 2006, 10:15 am
Error while using LWP December 1, 2005, 8:06 am
Have I an error in my POD? December 21, 2005, 6:35 pm
Deparse error July 7, 2004, 2:52 am
Out of Memory error September 12, 2004, 11:51 pm
expat error May 26, 2005, 9:01 pm
Error Installing XML::DOM October 15, 2004, 9:16 am
error with CPAN.pm October 19, 2004, 7:13 am
Error reporting in CGI May 19, 2005, 9:41 pm
DBI version error October 26, 2004, 11:49 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap