SMTP 错误 554 5.7.1 和 221 2.7.0

SMTP 错误 554 5.7.1 和 221 2.7.0

我有一台专用服务器,它连接到网络托管以使用 SMTP 协议发送邮件,但我收到 554 5.7.1 和 221 2.7.0 错误,并且无法发送电子邮件。完整的 SMTP 日志如下。

这是用 Perl 编写的发送电子邮件的脚本:

    my $mail = "mail.bellakabelky.sk";
    my $pass = "secret";
    my $user = "mail\@bellakabelky.sk";
    my $to = "tomsk.slovak\@gmail.com";

    use Data::Dumper;
    use Net::SMTP;
    use Mail::Mailer qw(sendmail);

    my $smtp = Net::SMTP->new(
                       Host => $mail,
                       Port => '25',
                       Hello => 'dev.bellakabelky.sk',
                       Timeout => 30,
                       Debug   => 1,
                      );
    print Dumper($smtp);
    $smtp->auth($user,$pass);
    $smtp->mail($user);
    $smtp->to($to);
    $smtp->recipient($to);
    $smtp->data();
    $smtp->datasend("To: Tomsk <$to>\r\n");
    $smtp->datasend("From: Mail <$user>\r\n");
    $smtp->datasend("Return-Path: $user\r\n");
    $smtp->datasend("Reply-To: $user\r\n");
    $smtp->datasend("Subject: Subject\r\n");
    $smtp->datasend("\r\n");
    $smtp->datasend("hello");
    $smtp->dataend();
    $smtp->quit;

我收到 554 5.7.1 和 221 2.7.0 错误。这是来自 SMTP 的日志:

Net::SMTP>>> Net::SMTP(2.33)
Net::SMTP>>>   Net::Cmd(2.30)
Net::SMTP>>>     Exporter(5.71)
Net::SMTP>>>   IO::Socket::INET(1.35)
Net::SMTP>>>     IO::Socket(1.38)
Net::SMTP>>>       IO::Handle(1.35)
Net::SMTP=GLOB(0x51d1810)<<< 220 mail4-1.hostmaster.sk ESMTP Postfix
Net::SMTP=GLOB(0x51d1810)>>> EHLO dev.bellakabelky.sk
Net::SMTP=GLOB(0x51d1810)<<< 250-mail4-1.hostmaster.sk
Net::SMTP=GLOB(0x51d1810)<<< 250-PIPELINING
Net::SMTP=GLOB(0x51d1810)<<< 250-SIZE 104857600
Net::SMTP=GLOB(0x51d1810)<<< 250-ETRN
Net::SMTP=GLOB(0x51d1810)<<< 250-STARTTLS
Net::SMTP=GLOB(0x51d1810)<<< 250-AUTH PLAIN LOGIN
Net::SMTP=GLOB(0x51d1810)<<< 250-AUTH=PLAIN LOGIN
Net::SMTP=GLOB(0x51d1810)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x51d1810)<<< 250 8BITMIME
$VAR1 = bless( \*Symbol::GEN1, 'Net::SMTP' );
Net::SMTP=GLOB(0x51d1810)>>> AUTH PLAIN bWFpbEBiZWxsYWthYmVsa3kuc2sAbWFpbEBiZWxsYWthYmVsa3kuc2sARXNob3AxMjNrYWJlbGt5
Net::SMTP=GLOB(0x51d1810)<<< 235 2.7.0 Authentication successful
Net::SMTP=GLOB(0x51d1810)>>> MAIL FROM:<[email protected]>
Net::SMTP=GLOB(0x51d1810)<<< 250 2.1.0 Ok
Net::SMTP=GLOB(0x51d1810)>>> RCPT TO:<[email protected]>
Net::SMTP=GLOB(0x51d1810)<<< 554 5.7.1 <[email protected]>: Sender address rejected: Your mail account ([email protected]) was compromised. Please change your password immediately after next login and contact technical support.
Net::SMTP=GLOB(0x51d1810)>>> RCPT TO:<[email protected]>
Net::SMTP=GLOB(0x51d1810)<<< 554 5.7.1 <[email protected]>: Sender address rejected: Your mail account ([email protected]) was compromised. Please change your password immediately after next login and contact technical support.
Net::SMTP=GLOB(0x51d1810)>>> DATA
Net::SMTP=GLOB(0x51d1810)<<< 554 5.5.1 Error: no valid recipients
Net::SMTP=GLOB(0x51d1810)>>> To: Tomsk <[email protected]>
Net::SMTP=GLOB(0x51d1810)>>> From: Mail <[email protected]>
Net::SMTP=GLOB(0x51d1810)>>> Return-Path: [email protected]
Net::SMTP=GLOB(0x51d1810)>>> Reply-To: [email protected]
Net::SMTP=GLOB(0x51d1810)>>> Subject: Subject
Net::SMTP=GLOB(0x51d1810)>>>
Net::SMTP=GLOB(0x51d1810)>>> hello
Net::SMTP=GLOB(0x51d1810)>>> .
Net::SMTP=GLOB(0x51d1810)<<< 221 2.7.0 Error: I can break rules, too. Goodbye.
Net::SMTP=GLOB(0x51d1810)>>> QUIT
Net::SMTP: Unexpected EOF on command channel at (eval 187) line 49.

我真的不知道问题出在哪里,我正在寻找解决方案,但没有找到任何东西。

答案1

完整性错误细目 -

Net::SMTP=GLOB(0x51d1810)>>> RCPT TO:<[email protected]>
Net::SMTP=GLOB(0x51d1810)<<< 554 5.7.1 <[email protected]>: Sender address rejected: Your mail account ([email protected]) was compromised. Please change your password immediately after next login and contact technical support.
Net::SMTP=GLOB(0x51d1810)>>> RCPT TO:<[email protected]>
Net::SMTP=GLOB(0x51d1810)<<< 554 5.7.1 <[email protected]>: Sender address rejected: Your mail account ([email protected]) was compromised. Please change your password immediately after next login and contact technical support.

发送收件人列表时,服务器会响应错误,这清楚地表明了问题所在。有趣的是,他们选择在此时响应错误,同时毫无问题地接受发件人地址,但这取决于他们。如果您想知道他们为什么认为该帐户被盗用,您需要询问邮件提供商。

Net::SMTP=GLOB(0x51d1810)>>> DATA
Net::SMTP=GLOB(0x51d1810)<<< 554 5.5.1 Error: no valid recipients

服务器在此处返回错误,因为您尝试发送邮件内容,但尚未设置任何收件人 - 给出的两个收件人均被拒绝。当没有接受收件人时,正确的邮件客户端将出错/断开连接,并且不会发送命令DATA

Net::SMTP=GLOB(0x51d1810)>>> .
Net::SMTP=GLOB(0x51d1810)<<< 221 2.7.0 Error: I can break rules, too. Goodbye.

当您的客户端继续尝试向服务器发送数据时,尽管没有有效的收件人并且服务器已拒绝您的DATA命令,服务器也会做出尖刻的回应。

相关内容