如何阅读从我的服务器发送的所有邮件

How to read all mails sent from my server

目前我服务器发来的邮件几乎都保存在收件人的垃圾邮件里。我在想。是因为我的服务器正在发送垃圾邮件吗?我指的是这个postHow to check if server is sending out spam?。我可以通过输入此命令来检查从我的服务器发送的所有电子邮件。

cat /var/log/maillog | grep 'to=<[a-z0-9_\.-]\+@[\da-z\.-]\+\.[a-z\.]\{2,6\}>' -o

我确实自己发了几封邮件,但上面的命令没有列出任何内容。如果我 cat /var/log/maillog,下面是我得到的。不确定如何阅读。

...
Jul  3 12:38:32 abcde-id467301 spamd[16679]: spamd: connection from localhost [::1]:37410 to port 783, fd 5
Jul  3 12:38:32 abcde-id467301 spamd[16300]: prefork: child states: I
Jul  3 12:38:32 abcde-id467301 dovecot: pop3-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<XaTr4hBwNNJ/AAAB>
Jul  3 12:38:33 abcde-id467301 dovecot: lmtp(10026): Connect from local
Jul  3 12:38:33 abcde-id467301 dovecot: lmtp(10026): Disconnect from local: Successful quit
...

有什么检查垃圾邮件的建议吗?谢谢。

修复 DMARC、DKIM 和 SPF 后进行编辑(它们都通过了)- 现在 gmail 可以,但 hotmail 不行。

做了几次测试

  1. https://www.mail-tester.com/

```

SpamAssassin does not like you
-0.1    DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid
This negative score will become positive if the signature is validated. See immediately below.
0.1 DKIM_VALID  Message has at least one valid DKIM or DK signature
Great! Your signature is valid
0.1 DKIM_VALID_AU   Message has a valid DKIM or DK signature from author's domain
Great! Your signature is valid and it's coming from your domain name
-1.999  FSL_HELO_BARE_IP_2  IP used in the HELO request
The hostname should be a domain name, not an IP address
-1.985  PYZOR_CHECK Similar message reported on Pyzor (http://pyzor.org)
Please test a real content, test Newsletters will always be flagged by Pyzor
Adjust your message or request whitelisting (http://public.pyzor.org/whitelist/)
-0.865  RCVD_NUMERIC_HELO   Received: contains an IP address used for HELO
-1.274  RDNS_NONE   Delivered to internal network by a host with no rDNS
This may be a false-positive, please check the reverse DNS test below to confirm or not this issue
0.001   SPF_PASS    SPF: sender matches SPF record
Great! Your SPF is valid

You're not fully authenticated
We didn't find a server (A Record) behind your hostname .......net.
We check if there is a server (A Record) behind your hostname .......net.
You may want to publish a DNS record (A type) for the hostname .......net or use a different hostname in your mail software.

```

  1. 发送电子邮件至 auth-results@verifier。port25.com

```

"iprev" check:      fail
SpamAssassin check: ham

"iprev" check details:

Result:         fail (reverse lookup failed (NXDOMAIN))
ID(s) verified: policy.iprev=---.--.---.--

DNS record(s):
    ---.--.---.--.in-addr.arpa. PTR (NXDOMAIN)


SpamAssassin check details:

SpamAssassin v3.4.0 (2014-02-07)

Result:         ham (-0.6 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
-0.0 SPF_PASS               SPF: sender matches SPF record
-0.5 BAYES_05               BODY: Bayes spam probability is 1 to 5%
                            [score: 0.0157]
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
                            domain
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature

```

默认情况下,在 cPanel 服务器上,使用 EXIM 发送电子邮件。因此电子邮件日志(用于接收和发送的电子邮件)位于 /var/log/exim_mainlog。在那里您可以看到有关发送到您的服务器或由您的服务器发送的任何电子邮件的详细信息。

很多因素都会导致您的电子邮件被发送到垃圾邮件。仅举几个: - 你的服务器的IP地址被列入黑名单(你可以使用像http://mxtoolbox.com/这样的工具来检查它) - 您没有为您的服务器定义正确的主机名 - 您的服务器没有正确的反向 DNS - SPF and/or DKIM 配置不正确

尝试将电子邮件从您的服务器发送到 Gmail 地址,例如您拥有的 Gmail 地址。然后转到 Gmail,即使电子邮件落入垃圾邮件,也请检查电子邮件 headers。在那里,您可以获得有关已进行哪些检查、您的电子邮件的垃圾邮件分数等的信息。这将是一个很好的起点,让您了解为什么已发送的电子邮件落入 Spam/Junk.

由于您提供的信息很少,很难猜测或提供正确的答案...