代码之家  ›  专栏  ›  技术社区  ›  Pak Ho Cheung

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

  •  0
  • Pak Ho Cheung  · 技术社区  · 7 年前

    目前,几乎所有从我的服务器发送的邮件都保存在收件人垃圾邮件中。我在想。是因为我的服务器正在发送垃圾邮件吗?我指的是这个帖子 How 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
    

    ```

    1 回复  |  直到 7 年前
        1
  •  1
  •   Bogdan Stoica    7 年前

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

    很多因素都会导致你的邮件变成垃圾。举几个例子: -您的服务器的IP地址被列入黑名单(您可以使用诸如 http://mxtoolbox.com/ ) -您没有为服务器定义正确的主机名 -您的服务器没有正确的反向dns -SPF和/或DKIM配置不正确

    尝试从服务器向gmail地址发送电子邮件,例如,您拥有的gmail地址。然后去gmail,即使邮件落在垃圾上,也请检查邮件头。在这里你可以得到关于什么检查已经做了,什么垃圾邮件得分你的电子邮件等信息。这将是一个很好的起点,让你找出为什么发送的电子邮件落在垃圾邮件/垃圾。

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

    推荐文章