![从我的 POSTFIX 邮件服务器发送的邮件转到 Gmail 垃圾邮件](https://linux22.com/image/650070/%E4%BB%8E%E6%88%91%E7%9A%84%20POSTFIX%20%E9%82%AE%E4%BB%B6%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8F%91%E9%80%81%E7%9A%84%E9%82%AE%E4%BB%B6%E8%BD%AC%E5%88%B0%20Gmail%20%E5%9E%83%E5%9C%BE%E9%82%AE%E4%BB%B6%20.png)
我已经在我的 VPS 上设置了一个 POSTFIX 服务器,通过它发送的邮件会被归类到 Gmail 中的垃圾邮件中。以下是我的消息:
Delivered-To: [email protected]
Received: by 10.140.43.75 with SMTP id d69csp350632qga;
Mon, 19 Jan 2015 15:29:29 -0800 (PST)
X-Received: by 10.194.89.39 with SMTP id bl7mr6149887wjb.76.1421710169272;
Mon, 19 Jan 2015 15:29:29 -0800 (PST)
Return-Path: <[email protected]>
Received: from mail.sgenov.com (mail.sgenov.com. [192.81.221.174])
by mx.google.com with ESMTP id j9si29338582wjy.109.2015.01.19.15.29.28
for <[email protected]>;
Mon, 19 Jan 2015 15:29:29 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 192.81.221.174 as permitted sender) client-ip=192.81.221.174;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of [email protected] designates 192.81.221.174 as permitted sender) [email protected];
dkim=pass [email protected]
Received: by mail.sgenov.com (Postfix, from userid 33)
id 665FB44097; Tue, 20 Jan 2015 01:29:28 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hotelfors-bg.com;
s=default; t=1421710168;
bh=ZOL1SsCcV0ncUnB8HJhFqzY/7ZocyZVCh5HCRSTXejY=;
h=To:Subject:Date:From;
b=TjCDSt9mOFyoXVGu4CI7xqPxR7iHMtzeL1Nykd+t0cZBlWEH15OQQVdkDR07G4xJH
WvKPQAFBHPVynQNYbnsRnwf4A57elvUImo77MDLZGhNGrS70fYdIjEjKAWe8BLX61G
1GuaBLPfJYYUz6SdVjYsBPNm/io2wrWc63Sdvb1M=
To: <[email protected]>
Subject: Hello, Stanimir
X-PHP-Originating-Script: 0:main.inc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 20 Jan 2015 01:29:28 +0200
From: [email protected]
Message-ID: <[email protected]>
X-Sender: [email protected]
User-Agent: Roundcube Webmail/0.7.2
This is my new email. Please add it to contacts and reach me if you
need anything.
Best Regards
如您所见,我的邮件服务器设置如下:
- 服务器有 DKIM
- 服务器具有经过验证的签名证书
- SPF(TXT) 设置正确
- 服务器的 PTR(反向 DNS)正确指向我的邮件服务器
- 所有可能的检查工具都为服务器提供了最大的结果(应该得到所有人的信任)
但是,gmail 将所有域中的所有邮件都发送到垃圾邮件。有人知道原因是什么或我应该采取什么措施吗?我可以联系某人吗?
提前致谢。
答案1
不确定下面的解决方案是否适合您,但它对我有用,因为我遇到了类似的问题。我正在使用传输图选择性地选择以 @gmail.com 为目标地址的邮件,并使用我的 G-Mail 凭据通过 smtp.gmail.com 进行中继以进行身份验证。
步骤如下:
将以下条目添加到 /etc/postfix/transport
gmail.com smtp:[smtp.gmail.com]
在 /etc/postfix/sasl_passwd 中添加以下条目
[smtp.gmail.com]:587 [email protected]:<your_gmail_password_here>
将以下条目添加到 /etc/postfix/main.cf
transport_maps = hash:/etc/postfix/transport
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtp_use_tls = yes
sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/transport