这条消息总是让我暂时进入雅虎黑名单。有什么问题吗

问题描述 投票:0回答:1

每当我向雅虎发送此消息时,我都会立即遭到临时阻止。我只发送给自己,因此没有进行垃圾邮件报告。

# all variables declared before...
$mail = new PHPMailer(true);

    $mail->isSMTP();
    $mail->Host       = 'localhost';
    //$mail->SMTPAuth   = true;
    $mail->Username   = '[email protected]';
    //$mail->Password   = 'password';
    //$mail->SMTPSecure = 'ssl';
    $mail->Port       = 25;
    $mail->SMTPAutoTLS = false;

    $mail->setFrom("[email protected]", "ExampleUser");
    $mail->addAddress("[email protected]");
    
    $mail->isHTML(true);
    $mail->Subject = "Web Development";
    $mail->Body    = "
    <div style='text-align: center; margin: auto;'>
    <div style='background-color: #EEEEEE; font-family: Arial, sans-serif; padding-top: 50px; padding-bottom: 50px; text-align: center; margin: auto;'>
    <div style='max-width: 400px; text-align: center; margin: auto;'>
    <div style='background-color: white;'>
    <a href='https://www.example.com'><img src='https://www.example.com/logo.jpg' style='border: solid black; width: 100%;'></a>
    <div style='text-align: left;'>
    <b>Name:</b> $name<br><b>E-Mail:</b> $email
    <br><br><span style='white-space: pre;'>$message</span>
    </div>
    </div><br>
    <div style='background-color: #767676; color: white;'>
    <b>Copyright &copy; 2012-$date Me</b><br>
    <b>All Rights Reserved</b>
    </div>
    </div>
    </div>
    </div>
";
    $mail->AltBody = "Example
--
$message

Copyright (c) 2012-$date me
All Rights Reserved
";
    $mail->XMailer    = "0"; 
    $mail->CharSet = 'UTF-8';
    $mail->Encoding = 'base64';
    
    $mail->DKIM_domain = 'example.com';
    $mail->DKIM_private = '../../private-dkim.key';
    $mail->DKIM_selector = 'default';
    $mail->DKIM_passphrase = '';
    $mail->DKIM_identity = $mail->From;
    $mail->DKIM_copyHeaderFields = false;

if (!$mail->send()) {
    echo "Message could not be sent.";
} else {
?>
        <h3>Thank-you <?php echo htmlentities($_POST['name'], ENT_QUOTES); ?>. Your message has been sent. You may get a reply within 24 hours or more. Return back to <a href='/contact_us/'>Contact Us</a>.</h3>
<?php
}

为什么这会导致我的 IP 地址进入雅虎黑名单?我不认为这有什么问题。

relay=mx-apac.mail.gm0.yahoodns.net[106.10.248.74]:25, delay=393, delays=390/0.03/2.7/0.11, dsn=4.7.0, status=deferred (host mx-apac.mail.gm0.yahoodns.net[106.10.248.74] said: 421 4.7.0 [TSS04] Messages from 49.206.228.251 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.verizonmedia.com/error-codes (in reply to MAIL FROM command))

编辑:

Received: from 10.197.33.11
 by atlas321.free.mail.bf1.yahoo.com with HTTP; Mon, 14 Dec 2020 08:32:56 +0000
Return-Path: <[email protected]>
Received: from 49.206.228.251 (EHLO example.com)
 by 10.197.33.11 with SMTPs; Mon, 14 Dec 2020 08:32:56 +0000
X-Originating-Ip: [49.206.228.251]
Received-SPF: pass (domain of mydomain.com designates 49.206.228.251 as permitted sender)
Authentication-Results: atlas321.free.mail.bf1.yahoo.com;
 dkim=pass [email protected] header.s=default;
 spf=pass smtp.mailfrom=example.com;

好像通过了DKIM、DMARC、SPF。甚至还为 IP 地址设置了 rDNS (PTR)。

php phpmailer postfix-mta blacklist yahoo-mail
1个回答
1
投票

我不认为你在这里做错了什么,这只是电子邮件发件人的生活。雅虎和微软域倾向于使用传递延迟来限制传递,而 gmail 倾向于将所有内容放入垃圾邮件文件夹中。

这并不是说该特定消息有任何问题,而是说它不喜欢从您那里看到的消息的总体集合。这可能是由于某些事情在您的控制范围内,因此请确保您的 SPF 记录正确,并且您正在进行 DKIM 签名(这对雅虎尤其重要 - 他们发明了它并非常严格地执行它)。 我看到您正在通过本地主机发送 - 这很好,只要您的本地邮件服务器是 DKIM 为您签名并正确转发即可。使用免费/开源邮件服务器几乎不可能进行大容量投递,因为它们通常缺乏投递限制之类的功能,或者虽然有但很难配置。

© www.soinside.com 2019 - 2024. All rights reserved.